当前位置: 首页>>代码示例>>C++>>正文


C++ Grammar::sanitize方法代码示例

本文整理汇总了C++中Grammar::sanitize方法的典型用法代码示例。如果您正苦于以下问题:C++ Grammar::sanitize方法的具体用法?C++ Grammar::sanitize怎么用?C++ Grammar::sanitize使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Grammar的用法示例。


在下文中一共展示了Grammar::sanitize方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: init_g


//.........这里部分代码省略.........
	r78->addT(CAUSES);
	Rule* r79 = new Rule();
	r79->setS(SimpleVP4);
	r79->addT(DOESNOTCAUSE);
	Rule* r80 = new Rule();
	r80->setS(SimpleVP5);
	Rule* r81 = new Rule();
	r81->setS(SimpleVP5);
	r81->addT(NOT);
	Rule* r82 = new Rule();
	r82->setS(SimpleVP6);
	r82->addT(VerbSing);
	Rule* r83 = new Rule();
	r83->setS(SimpleVP6);
	r83->addT(DOESNOT);
	r83->addT(VerbInf);
	Rule* r84 = new Rule();
	r84->setS(SimpleVP7);
	Rule* r85 = new Rule();
	r85->setS(SimpleVP7);
	r85->addT(NOT);
	Rule* r86 = new Rule();
	r86->setS(SimpleVP8);
	Rule* r87 = new Rule();
	r87->setS(SimpleVP8);
	r87->addT(PrepP);
	Rule* r88 = new Rule();
	r88->setS(Start);
	r88->addT(Paragraph);
	Rule* r89 = new Rule();
	r89->setS(Term);
	r89->addT(Term1);
	r89->addT(Noun);
	Rule* r90 = new Rule();
	r90->setS(Term1);
	Rule* r91 = new Rule();
	r91->setS(Term1);
	r91->addT(Adjective);
	Rule* r92 = new Rule();
	r92->setS(UniversalNP);
	r92->addT(UniversalNP1);
	Rule* r93 = new Rule();
	r93->setS(UniversalNP);
	r93->addT(EVERY);
	r93->addT(Term);
	Rule* r94 = new Rule();
	r94->setS(UniversalNP1);
	r94->addT(EVERYTHING);
	Rule* r95 = new Rule();
	r95->setS(UniversalNP1);
	r95->addT(EVERYONE);
	Rule* r96 = new Rule();
	r96->setS(VComplement);
	r96->addT(Noun);
	Rule* r97 = new Rule();
	r97->setS(VerbInf);
	r97->addT(VERBINF);
	Rule* r98 = new Rule();
	r98->setS(VerbP);
	r98->addT(SimpleVP);
	r98->addT(VerbP1);
	Rule* r99 = new Rule();
	r99->setS(VerbP);
	r99->addT(EITHER);
	r99->addT(SimpleVP);
	r99->addT(OR);
	r99->addT(SimpleVP);
	Rule* r100 = new Rule();
	r100->setS(VerbP);
	r100->addT(IS);
	r100->addT(PredComp);
	r100->addT(VerbP2);
	Rule* r101 = new Rule();
	r101->setS(VerbP);
	r101->addT(IS);
	r101->addT(EITHER);
	r101->addT(PredComp);
	r101->addT(OR);
	r101->addT(PredComp);
	Rule* r102 = new Rule();
	r102->setS(VerbP1);
	Rule* r103 = new Rule();
	r103->setS(VerbP1);
	r103->addT(AND);
	r103->addT(SimpleVP);
	Rule* r104 = new Rule();
	r104->setS(VerbP2);
	Rule* r105 = new Rule();
	r105->setS(VerbP2);
	r105->addT(AND);
	r105->addT(PredComp);
	Rule* r106 = new Rule();
	r106->setS(VerbPastPart);
	r106->addT(VERBPASTPART);
	Rule* r107 = new Rule();
	r107->setS(VerbSing);
	r107->addT(VERBSING);
	g->sanitize();
	return g;
}
开发者ID:haxxpop,项目名称:VoiceAKE,代码行数:101,代码来源:init_g.cpp


注:本文中的Grammar::sanitize方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。