逻辑信息模型(Logical Information Model) for Java:Example 08_3

逻辑信息模型(Logical Information Model) for Java:Example 08_3

"lim4j-samples": Example 08_3

逻辑信息模型(Logical Information Model) for Java:Example 08_3_第1张图片

 逻辑信息模型(Logical Information Model) for Java:Example 08_3_第2张图片


sample代码如下:

	public static void main(String[] args) throws Exception {
		HypotheticalProposition hpp1 = new HypotheticalProposition("If the growth momentum of the oil consumption remains, "
				+ "even if the oil imports are doubled, "
				+ "it will not change the trend of depletion of domestic oil reserves.");

		Statement s1 = new Statement("the growth momentum of the oil consumption remains");
		Statement s2 = new Statement("the oil imports are doubled");

		JudgedStatement js1 = new Proposition("it will not change the trend of depletion of domestic oil reserves.");
		
		Condition cd1 = new HypotheticalCondition(s1);
		Condition cd2 = new HypotheticalCondition(s2);
		Condition cd3 = new ConditionGroup(cd1, cd2);

		hpp1.setAntecedentAndConsequent(cd3, js1);

		Root root = new Root(hpp1);

		root.marshalToXml(true, System.out);
	}


输出结果:



    
        
            
            
        
        If the growth momentum of the oil consumption remains, even if the oil imports are doubled, it will not change the trend of depletion of domestic oil reserves.
    
    
        the growth momentum of the oil consumption remains
    
    
        the oil imports are doubled
    
    
        it will not change the trend of depletion of domestic oil reserves.
    
    
        
            
        
    
    
        
            
        
    
    
        
            
            
        
    

=============================

源代码:
lim4j-samples:https://github.com/CodeJStudio/lim4j-samples
lim4j:        https://github.com/CodeJStudio/lim4j

参考文献:
《逻辑信息模型与逻辑信息网络》 / "Theory of Logical Information Model & Logical Information Network"
《从逻辑信息模型,到逻辑信息网络,直至实现通用人工智能》
 

你可能感兴趣的:(通用人工智能,Java,逻辑学,java,人工智能,数据结构,图论,知识图谱)