Package com.googlecode.clearnlp.dependency

Examples of com.googlecode.clearnlp.dependency.DEPFeat


      // Convert CAS data into structures usable by ClearNLP
      for (int i = 0; i < tokens.size(); i++) {
        BaseToken token = tokens.get(i);
        String lemma = useLemmatizer ? lemmatizer.getLemma(token.getCoveredText(), token.getPartOfSpeech()) : token.getNormalizedForm();
        DEPNode node = new DEPNode(i+1, token.getCoveredText(), lemma, token.getPartOfSpeech(), new DEPFeat());
        tree.add(node);
      }

      // Run parser and convert output back to CAS friendly data types
      parser.process(tree);
View Full Code Here


          int id = idIter + 1;
          String form = casDepNode.getForm();
          String pos = casDepNode.getPostag();
          String lemma = casDepNode.getLemma();
         
          DEPNode node = new DEPNode(id, form, lemma, pos, new DEPFeat());
          tree.add(node);
          idIter++;
        }
      }
View Full Code Here

      // Convert CAS data into structures usable by ClearNLP
      for (int i = 0; i < tokens.size(); i++) {
        BaseToken token = tokens.get(i);
        String lemma = useLemmatizer ? lemmatizer.getLemma(token.getCoveredText(), token.getPartOfSpeech()) : token.getNormalizedForm();
        DEPNode node = new DEPNode(i+1, token.getCoveredText(), lemma, token.getPartOfSpeech(), new DEPFeat());
        tree.add(node);
      }

      // Run parser and convert output back to CAS friendly data types
      parser.process(tree);
View Full Code Here

        int id = i + 1;
        String form = casDepNode.getForm();
        String pos = casDepNode.getPostag();
        String lemma = casDepNode.getLemma();
       
        DEPNode node = new DEPNode(id, form, lemma, pos, new DEPFeat());
        tree.add(node);
      }

      for (int i=1; i<tree.size(); i++)
      {
View Full Code Here

TOP

Related Classes of com.googlecode.clearnlp.dependency.DEPFeat

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.