allenai / allennlp

An open-source NLP research library, built on PyTorch.
http://www.allennlp.org
Apache License 2.0
11.75k stars 2.25k forks source link

Pretrained model for fine-grained-ner ? #2867

Closed SundeepPidugu closed 5 years ago

SundeepPidugu commented 5 years ago

Please first search our GitHub repository for similar questions. If you don't find a similar example you can use the following template:

System (please complete the following information):

Question where do i get the Pretrained model for fine-grained-ner ? the model given for ner in models of Allennlp is simple and doesnt recognize most of the named entities. someone please share me the model for finegrainedner as shown in the demo page.

nelson-liu commented 5 years ago

You should be able to use this: https://github.com/allenai/allennlp/blob/master/allennlp/pretrained.py#L76-L82

SundeepPidugu commented 5 years ago

@nelson-liu Was trying to use this in from my local as

predictor = Predictor.from_path("Pretrained models/fine-grained-ner-model-elmo-2018.08.31.tar.gz")
result = predictor.predict(
  sentence="sundeep wishes to work at google"
)

i get this error

allennlp.common.checks.ConfigurationError: "Extra parameters passed to CrfTagger: {'constrain t_type': 'BIOUL'}"

whats the correct use of this and can you post a simple code.

SundeepPidugu commented 5 years ago

2276 this fixed my issue with this