There are already many taggers such as Stanford,opennlp, etc in DKpro but I would like to know how can I implement flair NER tagger in DKpro-core?
How can i use flair NER tagger with DKpro-core
210 Views Asked by Jack109 At
2
There are 2 best solutions below
0

A PoC for the integration of FlairNLP to DKPro is made here
As it was mentioned, the CAS objects generated by DKPro was imported with the help of DKPro cassis. The SoFA string was annotated by the FlairNLP. The NER annotations were mapped according to the DKPro NER annotations. The CAS was written back to an xmi file, which the DKPro can read back to annotate further.
Existing DKPro core integrated taggers such as Stanford, OpenNLP, etc. are either Java-based or Java compatible. However, flair NER tagger models are developed in python. Therefore to connect them with DKPro core requires a middleware tool.
DKPro Cassis, a UIMA CAS processing library is written in Python (also available as pypi project) and can directly use flair components such as flair NER tagger.
DKPro Cassis can import the Cas objects generated by DKPro core components and annotate the SofA with the tags provided by flair ner. After annotation, the Cas object can be exported back to the DKPro core.
PoC is in progress for the above analysis and will be updated here soon.