Last updated:
0 purchases
PhrExt 0.1.0
Phrase extraction
Input: PennyLane went to the school
Output: [{'Noun Phrase': 'PennyLane'}, {'Verb Phrase': 'went'}, {'Preposition': 'to'}, {'Noun Phrase': 'the school'}]
I train a sequence tagging model based on RoBERTa of Huggingface. The training code is given in train.py.
How to use
from PhrExt import PhraseExtractor
if __name__ == "__main__":
phrase_extractor = PhraseExtractor('transZ/phrext', 'roberta-base')
sent = "PennyLane went to the school"
res = phrase_extractor(sent)
print(res)
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.