java - Display Stanford NER confidence score -


I use the Stanford NER CRCCsififier to remove nominated institutions with news articles and apply for active education, Example of display:

Status (0.20) person (0.10) Organization (0.60) Each label unit would like to know what are the confidence scores of classes. MISC (0.10)

My code is for removing designated organizations with one text:

  abstractionexensifier & lt; Corelabel & gt; Classifier = CRFClassifier.getClassifierNoExceptions (Classifierfire_path); String annotated text = classifier. ClassifiedWindInlineXML (text);  

Is there an alternative solution to get thoses value with annotation?

I have written it myself in the doctor of CRFCilifera, which states:

The possibilities to be appointed by the CRF can be inquired either using the printProbsDocument () . Or getCliqueTrees () methods.

The first method is not useful because it prints only on the console, but I want to be able to access it, so I have read this method how to codify this method And its behavior has been copied a bit:

  list & lt; Corelabel & gt; Classifiedlabel = classifier Classified (sentence); CRFCliqueTree & LT; String & gt; CliqueTree = classifier.getCliqueTree (classified labels); For (int i = 0; i & lt; cliqueTree.length (); i ++) {corlabel y = classified labels.gate (i); (Iterator & lt; string & gt; iter = classifier.classIndex.iterator (); iter.hasNext ();) {string label = iter.next (); Int Index = Classifier Class index Indochaof (label); Double prob = cliqueTree.prob (i, index); System.out.println ("\ t" + Label + "(" + prob + ")"); } String tag = string longitude GateNot Nostrrusting (wi.get (CoreAnnotationEdit Annotation Class.)); System.out.println ("Class:" + tag); }  

Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -