Package edu.stanford.nlp.international.morph

Examples of edu.stanford.nlp.international.morph.MorphoFeatures


      if( !(t.firstChild().label() instanceof CoreLabel) || ((CoreLabel) t.firstChild().label()).originalText() == null )
        throw new RuntimeException(String.format("%s: Term lacks morpho analysis: %s",this.getClass().getName(),t.toString()));

      String morphoStr = ((CoreLabel) t.firstChild().label()).originalText();
      Pair<String,String> lemmaMorph = MorphoFeatureSpecification.splitMorphString("", morphoStr);
      MorphoFeatures feats = tagSpec.strToFeatures(lemmaMorph.second());
      cat = feats.getTag(cat);
    }

    //Update the label(s)
    t.setValue(cat);
    if (t.isPreTerminal() && t.label() instanceof HasTag)
View Full Code Here

TOP

Related Classes of edu.stanford.nlp.international.morph.MorphoFeatures

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.