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

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

"lim4j-samples": Example 13

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

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


sample代码如下:

	public static void main(String[] args) throws Exception {
		Definition df1 = new Definition("Lion is a (kind of) Felidae animal.");
		Definition df2 = new Definition("Lu Xun was a litterateur.");
		Definition df3 = new Definition("A motor vehicle is a vehicle driven on the road and powered by the movement of machines.");
		Definition df4 = new Definition("The first requirement for a planet in a celestial system is to orbit a star or stellar debris.");
		
		Concept c1 = new Concept("lion");
		Concept c2 = new Concept("Felidae animal");
		Concept c3 = new Concept("Lu Xun");
		Concept c4 = new Concept("litterateur");
		Concept c5 = new Concept("motor vehicle");
		
		Concept c6 = new Concept("vehicle driven on the road and powered by the movement of machines");
		Concept c7 = new Concept("the first requirement for a planet");
		Concept c8 = new Concept("to orbit a star or stellar debris");
		
		Concept c9 = new Concept("vehicle");
		Concept c10 = new Concept("driven on the road");
		Concept c11 = new Concept("powered by the movement of machines");
		Concept c12 = new ConceptGroup(c9, c10, c11);

		Concept c13 = new Concept("the first requirement");
		Concept c14 = new Concept("planet");
		Concept c15 = new ConceptGroup(c13, c14);

		Concept c16 = new Concept("orbit");
		Concept c17 = new Concept("star");
		Concept c18 = new Concept("stellar debris");
		Concept c19 = new ConceptGroup(c16, c17, c18);
		
		Condition cd1 = new QuantifiersCondition(null, QuantifiersType.SINGULAR, true);
		Condition cd2 = new Condition(c10);
		Condition cd3 = new Condition(c11);
		
		Attribute at1 = new DefaultAttribute(c13);

		c3.addCondition(cd1);
		c9.addCondition(cd2, cd3);
		c14.addAttribute(at1);
		
		c6.addSubConcept(c12);
		c7.addSubConcept(c15);
		c8.addSubConcept(c19);
		
		df1.setDefiniendumAndDefiniens(c1, c2);
		df2.setDefiniendumAndDefiniens(c3, c4);
		df3.setDefiniendumAndDefiniens(c5, c6);
		df4.setDefiniendumAndDefiniens(c7, c8);

		Root root = new Root(df1, df2, df3, df4);

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


输出结果:



    
        
            
            
        
        Lion is a (kind of) Felidae animal.
    
    
        
            
            
        
        Lu Xun was a litterateur.
    
    
        
            
            
        
        A motor vehicle is a vehicle driven on the road and powered by the movement of machines.
    
    
        
            
            
        
        The first requirement for a planet in a celestial system is to orbit a star or stellar debris.
    
    
        lion
    
    
        Felidae animal
    
    
        Lu Xun
        
    
    
        litterateur
    
    
        motor vehicle
    
    
        vehicle driven on the road and powered by the movement of machines
        
    
    
        the first requirement for a planet
        
    
    
        to orbit a star or stellar debris
        
    
    
        vehicle
        
    
    
        driven on the road
    
    
        powered by the movement of machines
    
    
        
            
            
            
        
    
    
        the first requirement
    
    
        
        planet
        
    
    
        
            
            
        
    
    
        orbit
    
    
        star
    
    
        stellar debris
    
    
        
            
            
            
        
    
    
        
            
        
    
    
        
    
    
        
    
    
        
        
    
    
        
            
        
    
    
        
            
            
        
    
    
        
            
        
    
    
        
            
            
        
    
    
        
            
        
    
    
        
            
        
    
    
        
            
        
    
    
        
            
        
    
    
        
            
        
    

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

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

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

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