乌尔都语语言数据集,用于基于方面的情感分析

时间:2019-11-15 09:43:23

标签: python dataset sentiment-analysis aspect urdu

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

1 个答案:

答案 0 :(得分:0)

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

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

还有一个非官方的pypi软件包here。它替代了一些内部依赖性,但仍然可以按预期工作。

也是最重要的问题,因此我们可能会更好地为您提供帮助:您要实现什么目标,您的最终目标是什么?