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");