【问题标题】:Urdu language dataset for aspect-based sentiment analysis用于基于方面的情感分析的乌尔都语语言数据集
【发布时间】:2019-11-15 09:43:23
【问题描述】:

when i run my code i get this error this error because of what>

text_raw_indices = tokenizer.text_to_sequence(text_left + " " + aspect + " " + text_right)
            text_raw_without_aspect_indices = tokenizer.text_to_sequence(text_left + " " + text_right)
            text_left_indices = tokenizer.text_to_sequence(text_left)
            text_left_with_aspect_indices = tokenizer.text_to_sequence(text_left + " " + aspect)
            text_right_indices = tokenizer.text_to_sequence(text_right, reverse=True)
            text_right_with_aspect_indices = tokenizer.text_to_sequence(" " + aspect + " " + text_right, reverse=True)
            aspect_indices = tokenizer.text_to_sequence(aspect)
            left_context_len = np.sum(text_left_indices != 0)
            aspect_len = np.sum(aspect_indices != 0)
            aspect_in_text = torch.tensor([left_context_len.item(), (left_context_len + aspect_len - 1).item()])
            polarity = int(polarity) + 1

【问题讨论】:

    标签: python dataset sentiment-analysis aspect urdu


    【解决方案1】:

    只需使用 LASER 就可以了。它也涵盖了乌尔都语。

    您可以在这里阅读更多内容:

    还有非官方的pypihere。它替代了一些内部依赖项,但仍按预期工作。

    还有最重要的问题,所以我们可以更好地帮助您:您想要实现什么,您的最终目标是什么?

    【讨论】:

    • 有趣的技巧是:你可以在不同语言的数据集上训练情感模型。猜猜英语情绪数据比乌尔都语更容易获得。一旦你在英语集上训练它,它也适用于乌尔都语,因为你训练模型来自潜在空间的特征,它涵盖了数十种语言。
    猜你喜欢
    • 2015-11-20
    • 2017-11-11
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-01-23
    • 2016-11-06
    • 2023-04-04
    • 1970-01-01
    相关资源
    最近更新 更多