Examples of XGrammarDocument


Examples of com.peterhi.schema.grammar.XGrammarDocument

import com.peterhi.schema.grammar.XGrammarDocument;

public class Application {

  public static void main(String[] args) throws Exception {
    XGrammarDocument doc = XGrammarDocument.Factory.parse(Application.class.getResourceAsStream("/grammar.xml"));
    CGrammar grammar = new CGrammar(doc.getGrammar());
   
    for (int i = 0; i < 1000; i++) {
   
    CWord noun = GrammarUtil.selectAny(grammar.getWords("id.parts-of-speech", "id.noun"));
//    CWord noun = grammar.getWord("word.people.persons");
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.