--- tags: - flair - token-classification - sequence-tagger-model widget: - text: "Sesuai diskusi. Barang mulus walau ada hairline scratch di casing depan. Battery masih awet. Dapat bonus keyboard jp jg. Thanks gan." --- Klasifikasi aspek dalam review laptop ### Demo: How to use in Flair Requires: - **[Flair](https://github.com/flairNLP/flair/)** (`pip install flair`) ```python from flair.data import Sentence from flair.models import SequenceTagger # load tagger tagger = SequenceTagger.load("yudiwbs/absa_elektronik_aspek_v2") sentence = Sentence('Sesuai diskusi. Barang mulus walau ada hairline scratch di casing depan. Battery masih awet. Dapat bonus jg. Thanks gan.') # predict model.predict(sentence) print(sentence.to_tagged_string()) # iterate over entities and print for entity in sentence.get_spans('aspek'): print(entity) ```