1 / 24

Semantic Search -- Ask the World using your own vocabulary

Semantic Search -- Ask the World using your own vocabulary. Arping. Keyword search. Google. Outline. Review PIL 0.1 PIL 0.2 version Semantic Extractor and Dumper Semantic Search. 1.名稱不同. 2.位置不同. 3.語言不同. 4.結構不同. 5.意義不同. Review: Problem.

santos
Download Presentation

Semantic Search -- Ask the World using your own vocabulary

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Semantic Search-- Ask the Worldusing your own vocabulary Arping

  2. Keyword search Google

  3. Outline • Review PIL 0.1 • PIL 0.2 version • Semantic Extractor and Dumper • Semantic Search

  4. 1.名稱不同 2.位置不同 3.語言不同 4.結構不同 5.意義不同 Review: Problem <private security=“L112481632”> <name> Yuh-Pyng Shieh </name> <father> YeFu Shieh </father></private> <客戶資料> <姓名> 謝育平 </姓名></客戶資料> <person sex=“male”> <security>L112481632</security> <name> <first_name>Yuh-Pyng </first_name> <last_name> Shieh </last_name> </name> <father> L186619019 </father> <brother> An Shieh </brother></person>

  5. XML world Semantic Extraction Language Logic world Logic Programming Language Review: Meaning of a XML <person sex=“male”> <security>L112481632</security> <name> <first_name>Yuh-Pyng </first_name> <last_name> Shieh </last_name> </name> <father> L186619019 </father> <brother> An Shieh </brother></person> male(A).person(A).security(#”L112481632”).person(A).name(#”Yuh-Pyng Shieh”).father(z,A):-person(z).security(#”L186619019”).brother(x,A):- father(z,x), father(z,A), male(x), person(x).name(#”An Shieh”).

  6. 3 1 2 Review: Reasoning Framework

  7. Review: PIL 0.1 G (node label data link) label(node#data).label(node#data) person(na1) na1#”L112481632” person(#”L112481632”) person(na1#”L112481632”) na1.na4 person(na1#”L112481632”).name(na4#”Yuh-Pyng Shieh”).last_name(na12#”Shieh”) person(na1)..last_name(na12)

  8. Review: constraints on PIL 0.1 • Every node has at most one label and one datum. • This means each object belongs to only one class. • Unary relation and label are confusing. • Make them the same. • The sense of Object Oriented Concept is not strong.

  9. PIL 0.2 M (node data link) Entity Relation Model unary(node#data).binary.unary(node#data) person(na1#”L112481632”) (na1#”L112481632”) person(#”L112481632”) person(na1) person() (na1) (#”L112481632”) () person(na1#”L112481632”).name(na4#”Yuh-Pyng Shieh”).last_name(na12#”Shieh”) person(na1#”L112481632”).has.name(na4#”Yuh-Pyng Shieh”).has.last_name(na12#”Shieh”) person(na1).majorin.university (na6) person(na1)..last_name(na12)

  10. Binary Connector • A(x).M.B(y) • A(x), M(x,y), B(y) • A(x), A_M_B(x,y), B(y) • A(x)_M_B(y) • A(x), A_M_B(x,y), B(y) • A(x)-M-B(y) • A(x), M(x,y), B(y)

  11. The syntax of PIL 0.2 (1/3) • The syntax is constructed by (NV,DV,P,DF, NC). • NV is a set of variables for nodes. • DV is a set of variables for data. • P is a set of basic predicates. (P2’,P0,P1,P2, …) • e1P1, e2, ef P2, P2’={u1_b_u2| bP2, u1,u2P1} • DF is a set of data functions. • NC is a set of node constant (0-ary function). • Then, we are going to construct four sets: • a data term set T, • an argument set G, • a connector set C, • an atom set A, • and a sentence set S by induction.

  12. The syntax of PIL 0.2 (2/3) • xT, if xDV. • f(t1,t2,t3,…,tk)T, if fDF, tiT, and arity(f)=k. • n#t, n, #t, egG, if nNVNC, and tT. • n, #t, eg not in the right hand side of :- are shorthands of n#ed, nc#t, nc#ed where ed is the empty data and nc is a new node symbol for each appearance. • n, #t, eg in the right hand side of :- are shorthands of n#z, x#t, y#w where x,y are new node variables and z,w are new data variables. • eg can be skipped in syntax.

  13. The syntax of PIL 0.2 (3/3) • .b. , _b_ , -b- C, if bP2 • .e2. can be shortened as . • .ef. Can be shortened as .. • .b. is either _b_ or -b- by preprocessing definition. • u1(g1)c1u2(g2)c2…uk(gk)A, if ui P1, ciC, giG. • It is a shorthand of ui(gi) and uiciui+1(gi,gi+1), if ci is of case _b_ • b(gi,gi+1), if ci is of case -b- • p(g1,g2,g3,…,gk)A, if pP, giG and arity(p)=k. • a1,a2,a3,…,ak.S, if aiA. • d1,d2,d3,…,dm:-a1,a2,a3,…,ak.S, if di, aiA. • s1 s2 s3 … sk is a program, if siS.

  14. Denotational Semantics (1/3) • The universe U of a model M of a program is (DU,NU), where • DU is a set of nodes, • NU is a set of data. •  is a simple substitution if  maps node variables to DU and data variables to NU instead of any term in T. • M maps n in NV to nM in NU, x in DV to xM in DU, but M maps n to nM=(n) and x to xM=(x).

  15. Denotational Semantics (2/3) • M maps x in DV to xM in DU. • M maps f(t1,t2,t3,…,tk) T to fM(t1M,t2M,t3M,…,tkM) in DU. • M maps y in NV to yM in NU. • M maps n in NC to nM in NU. • M maps p to be a set pM(NU#DU)k. • M maps n#t to nM#tM • M╞p(g1,g2,…,gk)If (g1M,g2M,…,gkM)pM.

  16. Denotational Semantics (3/3) • M╞e1(g) if M╞u(g) for some uP1. • M╞ef(g1,g2) if • M╞e2(g1,g2) or • M╞ef(g1,g) and M╞e2(g,g2) for some g. • M╞e2(g1,g2) if M╞b(g1,g2) for some bP2. • M╞b(g1,g2) if M╞u1_b_u2(g1,g2) for some u1, u2 in P1. • M╞e1_b_u2(g1,g2) if M╞u1_b_u2(g1,g2) for some u1 in P1. • M╞u1_b_e1(g1,g2) if M╞u1_b_u2(g1,g2) for some u2 in P1. • M╞e1_b_e1(g1,g2) if M╞u1_b_u2(g1,g2) for some u1, u2 in P1. • M╞a1,a2,a3,…,ak.if for any simple substitution , M╞ai. • M╞d1,d2,d3,…,dm:-a1,a2,a3,…,ak.if for any simple substitution , • M╞di for all i or M does not satisfy ai for some i. • M╞s1 s2 s3 … sk if M╞si for all i.

  17. Operational Semantics • We transform programs in PIL into programs in Prolog. • Un-skipping and un-shortening everywhere. • n, #t, eg, . .. .b. u1(g1)c1u2(g2)c2…uk(gk) • Transform n#t into n,t • We assume that each fDF is a embedded function in Prolog. • Put e1(n,t) :- u(n,t) for each u in P1. • Put ef(n1,t1,n2,t2):- e2(n1,t1,n2,t2). • Put ef(n1,t1,n2,t2):- ef(n1,t1,n,t), e2(n,t,n2,t2). • Put e2(n1,t1,n2,t2) :- b(n1,t1,n2,t2) for each b in P2. • Put b(n1,t1,n2,t2):-u1_b_u2(n1,t1,n2,t2) for each u1,u2 in P2. • Put e1_b_u2(n1,t1,n2,t2):-u1_b_u2(n1,t1,n2,t2) for each u1 in P2. • Put u1_b_e1(n1,t1,n2,t2):-u1_b_u2(n1,t1,n2,t2) for each u2 in P2. • Put e1_b_e1(n1,t1,n2,t2):-u1_b_u2(n1,t1,n2,t2) for each u1,u2 in P2.

  18. Advantage • Use different connectors {.b. _b_ -b-} to identify exactly meaning of path expression. • Each object can belong to not only one class (unary relation) and can have more than one datum. • Each class (unary relation) has its own relation member (binary relation) and its own data member (unary relation). • Use default relations {e1,e2,ef} to do fuzzy reasoning. • Use default arguments {nc,ed,eg} to shorten the path expression and reach human’s intuition.

  19. Name Space • We can make an ontology above ontologies to do reasoning. • Butterfly.pil Animal.pil • Above.pil may have a following rule. • Animal::butterfly(x) :- Butterfly::butterfly(x)

  20. 3 1 2 Reasoning Framework

  21. Extractor and Dumper XML World <=> Logic World. private.sem #convert private.dtd into person.pil private(X).@security(#Y) <=> person(X).security(#Y). private(X).@sex(#”male”) <=> male(X). private(X).name(Z#Y), fetch(Y,”[[a-zA-Z]*/F] [[a-zA-Z]/A][[ ]*]”)=> person(X).name(Z).last_name(#A), Z.first_name(#F). private(X).tel(Z#Y), fetch(Y,”0[[0-9]/A]-[[0-9]*/N]-[[0-9]*/E]”)=> person(X).telephone(Z#Y).nation_code(#”886”), Z.area_code(#A), Z.number(#N), Z.extension(#E). private(X).advisor(#Y) => advisor_of(X,Z):-person(Z).name(#Y). private(X).father(#Y) => father_of(X,Z):-person(Z).security(#Y).

  22. Semantic Search-- Ask the worldusing your own ontology

  23. Semantic Search • Ontologies and extractors/dumpers are built for local reasoning, not for global Semantic Search Project (SSP). SSP just reuse their components.

  24. 來喔! 來討論喔!!! 每個星期一晚上八點 招兵買馬 我來了!! 等等我!!! 我只要有竹筍吃就好了!! 再說一次!! 我沒聽到!

More Related