In unweighted relation graphs like WordNet, a MST can be computed very efficiently While guaranteeing that each node is reached through the shortest path possible. Through the lowest number of links (as Breadth-first search would). This tree is minimal because it includes the reachable nodes only once,īut it is not necessarily a Minimum Spanning Tree (MST), because theĭepth-first search strategy does not guarantee that nodes are reached Produces a tree that includes all reachable nodes (i.e., a spanning tree). Prunes the tree globally, thus discarding any additional redundancy, and Is tractable with the normal tree() function, as seen above.īut while tree() only prunes redundancy within local branches, acyclic_tree() Smaller SCC: counting only five members, the SCC that includes ‘bound.a.01’ Several hundred lines long, so here is a simpler example, concerning a much The also_sees() acyclic tree of ‘concrete.a.01’ is On the other hand, the new acyclic_tree() function is able to also handle > from pprint import pprint > pprint ( wn. So its also_sees() tree is intractable, and can normally only be handledīy limiting the depth parameter to display a small number of levels: trees that are too big to compute or display on any computer.įor example, the synset ‘concrete.a.01’ is a member of the largest SCC, This produces intractable relation trees for each of these 758 Transitively connected by the same relation, to all other members of the WordNet, because the also_sees() relation has a big Strongly ConnectedĬomponent (_SCC_) consisting in 758 synsets, where any member node is Intractable, due to combinatorial explosion in a relation. However, even after discarding the infinite cycles, some trees can remain closure ( hyper )) Regression Tests ¶īug 85: morphy returns the base form of a word, if it’s input is givenĪs a base form for a POS for which that word is not defined: synset ( 'dog.n.01' ) > hypo = lambda s : s. Lemma('stretch.v.02.stretch') Somebody stretch something | Somebody stretch Lemma('stretch.v.02.extend') Somebody extend something Similarity ¶ Lemma('think.v.01.think') Something think something Adjective/Noun | Somebody think somebody Lemma('think.v.01.believe') Something believe something Adjective/Noun | Somebody believe somebody Lemma('think.v.01.consider') Something consider something Adjective/Noun | Somebody consider somebody Lemma('think.v.01.conceive') Something conceive something Adjective/Noun | Somebody conceive somebody > wn.
0 Comments
Leave a Reply. |