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

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

"lim4j-samples": Example 12

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

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


sample代码如下:

	public static void main(String[] args) throws Exception {
		Argument a1 = new Argument("Love looks not with the eyes, but with the mind; And therefore is wing'd Cupid painted blind.");

		Statement s1 = new Statement("if there is a wing'd Cupid");
		Statement s2 = new Statement("Cupid is a symbol (or synonymous) of love");
		Statement s3 = new Statement("blindness is to see with the mind rather than with the eyes");

		Condition cd1 = new HypotheticalCondition(s1, true);
		Condition cd2 = new PremiseCondition(s2, true);
		Condition cd3 = new PremiseCondition(s3, true);

		a1.addCondition(cd1, cd2, cd3);

		Root root = new Root(a1);

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


输出结果:



    
        Love looks not with the eyes, but with the mind; And therefore is wing'd Cupid painted blind.
        
    
    
        if there is a wing'd Cupid
    
    
        Cupid is a symbol (or synonymous) of love
    
    
        blindness is to see with the mind rather than with the eyes
    
    
        
            
        
    
    
        
            
        
    
    
        
            
        
    
    
        
            
            
            
        
    

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

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

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

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