tf_ner icon indicating copy to clipboard operation
tf_ner copied to clipboard

Custom Entity Recognition

Open vamsitharun opened this issue 5 years ago • 4 comments

How to train custom entity labels other than PER, LOC, ORG & MISC?

I need entities like "total amount" from a document.

vamsitharun avatar Apr 02 '19 06:04 vamsitharun

The code is data agnostic: if you provide the right vocab files / data files, it will be able to learn any task.

guillaumegenthial avatar Apr 12 '19 05:04 guillaumegenthial

@guillaumegenthial Hi, I used some tags other than PER, LOC, ORG &MISC,but when I used conlleval to evaluate the predictions, it only has accuray not zero, precision,recall and FB1 are all zeros, and there isn't evaluation results for each tag. The output of conlleval is as follows, can you tell me what's wrong? Thank you~

processed 120652 tokens with 0 phrases; found: 0 phrases; correct: 0. accuracy: 97.37%; precision: 0.00%; recall: 0.00%; FB1: 0.00

VioletJKI avatar Apr 25 '19 15:04 VioletJKI

@guillaumegenthial Hi, I used some tags other than PER, LOC, ORG &MISC,but when I used conlleval to evaluate the predictions, it only has accuray not zero, precision,recall and FB1 are all zeros, and there isn't evaluation results for each tag. The output of conlleval is as follows, can you tell me what's wrong? Thank you~

processed 120652 tokens with 0 phrases; found: 0 phrases; correct: 0. accuracy: 97.37%; precision: 0.00%; recall: 0.00%; FB1: 0.00

Face same problem ? Did you able to resolve this problem

ahmadshabbir2468 avatar Aug 30 '19 07:08 ahmadshabbir2468

I think you need to provide -r inorder get the result for raw tags. below are the options

conlleval: evaluate result of processing CoNLL-2000 shared task usage: conlleval [-l] [-r] [-d delimiterTag] [-o oTag] < file README: http://cnts.uia.ac.be/conll2000/chunking/output.html options: l: generate LaTeX output for tables like in http://cnts.uia.ac.be/conll2003/ner/example.tex r: accept raw result tags (without B- and I- prefix; assumes one word per chunk) d: alternative delimiter tag (default is single space) o: alternative outside tag (default is O) note: the file should contain lines with items separated by $delimiter characters (default space). The final two items should contain the correct tag and the guessed tag in that order. Sentences should be separated from each other by empty lines or lines with $boundary fields (default -X-). url: http://lcg-www.uia.ac.be/conll2000/chunking/ started: 1998-09-25 version: 2004-01-26 author: Erik Tjong Kim Sang [email protected]

karthikeyansam avatar Sep 17 '19 08:09 karthikeyansam