Package net.sf.nlpshell.domain

Examples of net.sf.nlpshell.domain.PartOfSpeech


  public PartOfSpeech buildPOS(Parse parse) {

    String type = parse.getType();

    PartOfSpeech partOfSpeech = null;

    PennTreeBankWordTagset posTag = POSWord.resolveTag(type);
    if (posTag != null) {
      partOfSpeech = POSWord.newWordInstance(posTag, parse.toString());
    }
View Full Code Here


          .toArray(new Mention[0]));
      // showEntities(entities);
      (new CorefParse(Arrays.asList(parses), entities)).show();
    }

    PartOfSpeech pos = new OpenNlpConverter().buildPOS(chosen_parse);

    // extract frame
    SemanticFrame searchFrame = pos.frame();
    String frameString = searchFrame.toFrameString();
    System.out.println("Frame : " + frameString);

    // extract verb
    Verb verb = searchFrame.getVerb();
View Full Code Here

public abstract class POSWord extends PartOfSpeech {

  public static PartOfSpeech newWordInstance(PennTreeBankWordTagset tag,
      String text) {
    PartOfSpeech partOfSpeech = null;
    switch (tag) {
    case VB:
      partOfSpeech = new VerbBase(text);
      break;
    case VBZ:
View Full Code Here

TOP

Related Classes of net.sf.nlpshell.domain.PartOfSpeech

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.