Examples of PartOfSpeech


Examples of com.sun.speech.freetts.PartOfSpeech

    protected void setupFeatureProcessors() throws IOException {
        if (phonesetURL != null) {
            phoneSet = new PhoneSetImpl(phonesetURL);
        }
        if (partOfSpeechURL != null) {
            PartOfSpeech pos = new PartOfSpeechImpl(partOfSpeechURL, "content");
            addFeatureProcessor("gpos", new FeatureProcessors.Gpos(pos));
        }
      addFeatureProcessor("word_break", new FeatureProcessors.WordBreak());
      addFeatureProcessor("word_punc", new FeatureProcessors.WordPunc());
       addFeatureProcessor("word_numsyls",new FeatureProcessors.WordNumSyls());
View Full Code Here

Examples of com.sun.speech.freetts.PartOfSpeech

    protected void setupFeatureProcessors() throws IOException {
        if(phonesetURL != null){
               phoneSet  = new PhoneSetImpl(phonesetURL);
             }
        if(partOfSpeechURL != null){
          PartOfSpeech pos = new PartOfSpeechImpl(partOfSpeechURL,
          "content");
             addFeatureProcessor("gpos", new FeatureProcessors.Gpos(pos));
        }
       
View Full Code Here

Examples of com.sun.speech.freetts.PartOfSpeech

     *
     * @throws IOException if an I/O error occurs
     */
    protected void setupFeatureProcessors() throws IOException {
  BulkTimer.LOAD.start("FeatureProcessing");
        PartOfSpeech pos = new PartOfSpeechImpl(
            getResource("part_of_speech.txt"),
      "content");

        phoneSet  = new PhoneSetImpl(getResource("phoneset.txt"));

View Full Code Here

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

Examples of net.sf.nlpshell.domain.PartOfSpeech

          .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

Examples of net.sf.nlpshell.domain.PartOfSpeech

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

Examples of org.fnlp.nlp.cn.PartOfSpeech

    for(int i=0;i<taggedstr.length;i++){
      String[] words = taggedstr[i][0];
      String[] pos = taggedstr[i][1];
     
      PartOfSpeech strtag = null;
     
      PartOfSpeech[] epos = PartOfSpeech.valueOf(pos);
     
      for(int j=0;j<words.length;j++){ 
        index++;
        subDistance = 0;
        String headword = null;
        if(epos[j]==PartOfSpeech.标点&&((words[j].equals(","))
            ||(words[j].equals(":")))){
          subDistance++;
        }
       
       
        if(isPart(epos[j],words[j])){
          int id = j;
          strdata = words[j];
          strtag = epos[j];
          headword = words[j];
          flag = 0;
          ey = new Entity();         
          ey.start = index;
         
          Singular isSing = Singular.UNKONW;
         
          while(j<words.length-1){
            boolean isModify = !(isNN(epos[j])&&words[j+1].equals("的"));
            if(isModify&&isPart(epos[j+1],words[j+1])){           
              if(epos[j]==PartOfSpeech.数词 &&(words[j].equals("一")||
                  words[j].equals("半")||words[j].equals("1")))
                isSing = Singular.Yes;
              else if (epos[j]==PartOfSpeech.数词 &&!(words[j].equals("一")
                  ||words[j].equals("半")||words[j].equals("1"))){
                isSing = Singular.No;
              }
              strdata+= words[j+1];
              strtag = epos[j+1];
              headword = words[j+1];
              j++;   
              flag++;
            }
            else
              break;
          }
          if(strtag.isPronoun()||strdata.contains("这")||
              strdata.contains("那")||strdata.contains("该")){
            ey.setIsResolution(true);
          }
          else
            ey.setIsResolution(false);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.