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

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

"lim4j-samples": Example 17

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

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

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


sample代码如下:

	public static void main(String[] args) throws Exception {
		Argument a1 = new Argument("At standard atmospheric pressure, when the temperature drops to 0 ℃, water will gradually condense, so then water will go from liquid to solid.");
		Argument a2 = new Argument("Because water will gradually condense when it is at standard atmospheric pressure and its temperature drops to 0 ℃, water will go from liquid to solid.");

		Statement s1 = new Statement("At standard atmospheric pressure");
		Statement s2 = new Statement("the temperature drops to 0 ℃");
		Statement s3 = new Statement("water will gradually condense");
		Statement s4 = new Statement("water will go from liquid to solid");

		JudgedStatement js1 = new Proposition("at standard atmospheric pressure, when the temperature drops to 0 ℃, water will gradually condense");
		JudgedStatement js2 = new Proposition(s3);
		JudgedStatement js3 = new Proposition(s4);
		
		Condition cd1 = new Condition(s1);
		Condition cd2 = new Condition(s2);
		Condition cd3 = new Condition(cd1, true);
		Condition cd4 = new Condition(cd2, true);
		
		js1.addCondition(cd1, cd2);
		js3.addCondition(cd3, cd4);

		a1.addSubInformationElement(s1, s2, s3, s4);
		a1.addEvidence(js1);
		a1.addConclusion(js3);

		a2.addSubInformationElement(s3, s1, s2, s4);
		a2.addEvidence(js2);
		a2.addConclusion(js3);
		a2.addCondition(cd1, cd2);
		
		BaseRelation br1 = new EquivalenceRelation(a1, a2);

		Root root = new Root(br1);

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


输出结果:



    
        
        At standard atmospheric pressure, when the temperature drops to 0 ℃, water will gradually condense, so then water will go from liquid to solid.
        
        
        
        
    
    
        
        Because water will gradually condense when it is at standard atmospheric pressure and its temperature drops to 0 ℃, water will go from liquid to solid.
        
        
        
        
        
    
    
        At standard atmospheric pressure
    
    
        the temperature drops to 0 ℃
    
    
        water will gradually condense
    
    
        water will go from liquid to solid
        
    
    
        at standard atmospheric pressure, when the temperature drops to 0 ℃, water will gradually condense
        
    
    
        
    
    
        
    
    
        
    
    
        
    
    
        
            
            
        
    
    
        
            
            
        
    
    
        
            
            
            
            
        
    
    
        
            
        
        
    
    
        
        
    
    
        
            
            
        
    
    
        
            
            
        
    
    
        
            
            
            
        
    
    
        
            
        
    
    
        
            
            
        
    
    
        
            
        
        
    
    
        
        
    
    
        
            
            
        
    
    
        
            
        
    
    
        
            
            
        
    
    
        
            
        
    
    
        
            
        
    
    
        
            
            
            
            
        
    
    
        
            
        
        
    
    
        
        
    
    
        
            
            
        
    
    
        
            
            
        
    
    
        
            
            
            
        
    
    
        
            
        
    
    
        
            
            
        
    
    
        
            
        
        
    
    
        
        
    
    
        
            
            
        
    
    
        
            
        
    
    
        
            
            
        
    
    
        
            
        
    
    
        
            
        
    
    
        
            
            
        
    
    
        
        
    

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

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

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

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