Views
No views yet
git clone https://github.com/Accord-Project/accord-nlp.git
cd accord-nlp
pip install -r requirements.txtpip install accord-nlp1from accord_nlp.text_classification.ner.ner_model import NERModel
2
3model = NERModel('roberta', 'ACCORD-NLP/ner-roberta-large')
4predictions, raw_outputs = model.predict(['The gradient of the passageway should not exceed five per cent.'])
5print(predictions)1from accord_nlp.text_classification.relation_extraction.re_model import REModel
2
3model = REModel('roberta', 'ACCORD-NLP/re-roberta-large')
4predictions, raw_outputs = model.predict(['The <e1>gradient<\e1> of the passageway should not exceed <e2>five per cent</e2>.'])
5print(predictions)