Examples of LingpipeTools


Examples of org.sf.mustru.utils.LingpipeTools

  int contentSizeLimit = Constants.DOC_LENGTH_MAXLIMIT;
  int textSize = doc.getContents().length();
  if (textSize > contentSizeLimit )
       doc.setContents( (new StringBuffer( doc.getContents().substring(0, contentSizeLimit ) ) ) );
 
  LingpipeTools sentTools = new LingpipeTools();
  sentTools.buildSentences(doc.getContents().toString()); String sentence; int i = 0;
  while ( (sentence = sentTools.nextSentence()) != null)
    { System.out.println(" " + i + "( " + sentence.length() + " ) : " +  sentence); i++;
 
  System.out.println("Ended testPdfFile");
}
View Full Code Here

Examples of org.sf.mustru.utils.LingpipeTools

   " SUKRUPA's CONCERNS: SUKRUPA and the area of its concern in the State of Karnataka in Southern India encompasses every conceivable element of development and its priorities are rural and urban poor, dalits, women and children. As for the geographic area, presently it is concerned about a cluster of slums in Bangalore city and a few villages in the rural suburb. " +
   " The state of affairs with regard to children is a compelling factor, they being 40 % of our population and with every third household having a working child and every fourth child in the age group of 5 to 15 being employed. The women deemed as lesser beings are the most exploited in all walks of life and need to be empowered to enjoy their rightful status in the family and in the community.";
   System.out.println("INPUT TEXT: ");
   System.out.println(text);

   LingpipeTools sentTools = new LingpipeTools();
   sentTools.setMaxCharsPerSentence(250); sentTools.setMinCharsPerSentence(150);
   sentTools.buildSentences(text); String sentence; int i = 0;
   while ( (sentence = sentTools.nextSentence()) != null)
    { System.out.println(" " + i + "( " + sentence.length() + " ) : " +  sentence); i++;
     
}
View Full Code Here

Examples of org.sf.mustru.utils.LingpipeTools

   */  
  private LingpipeTools ling = null;

  protected void setUp()
  { PropertyConfigurator.configure (Constants.LOG4J_FILE)
  ling = new LingpipeTools()}
View Full Code Here

Examples of org.sf.mustru.utils.LingpipeTools

   float[] decoder = new float[256]; for (int i = 0; i < decoder.length; i++) decoder[i] = (float) 1.0;
   Similarity.setNormDecoder(decoder);
   is.setSimilarity(new SearchSimilarity());
  
   String[] addEntities = {"Qword"};
   posTagger = new LingpipeTools(); posTagger.setforPOS(addEntities);
   sq = new SearchQuery();
   elementBuffer = new StringBuffer();
  
   stopWords = StopFilter.makeStopSet(Constants.getSTOP_WORDS());
   questionWords = StopFilter.makeStopSet(Constants.getQwords());
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.