[demo] For demo2, don't read the whole file
authorSimon Chabot <simon.chabot@logilab.fr>
Thu, 08 Nov 2012 11:41:01 +0100
changeset 92 e01895cdf886
parent 91 b24c0407d660
child 93 203140d3f9ed
[demo] For demo2, don't read the whole file
demo.py
--- a/demo.py	Mon Nov 12 18:31:44 2012 +0100
+++ b/demo.py	Thu Nov 08 11:41:01 2012 +0100
@@ -88,7 +88,8 @@
 
 def demo_2():
     targetset = parsefile(path.join(DEMODIR, 'demo', 'FR.txt'), indexes=[0, 1, (4, 5)])
-    alignset = parsefile(path.join(DEMODIR, 'demo', 'frenchbnf'), indexes=[0, 2, (14, 12)])
+    alignset = parsefile(path.join(DEMODIR, 'demo', 'frenchbnf'), indexes=[0, 2, (14, 12)],
+                         nbmax=30000)
 
     neighbors = findneighbours(alignset, targetset, indexes=(2, 2),
                                mode='kdtree', threshold=0.1)
@@ -105,8 +106,6 @@
 
     print "Start computation"
     for ind, nei in enumerate(neighbors):
-#        print alignset[ind][1]
-#        print [targetset[i][1] for i in nei]
         m, b = align([alignset[ind][:2]],      # The dataset to align
               [targetset[i][:2] for i in nei], # The target dataset
               [tr_name],