[nazca] Create a record linkage directory, related to #187461

authorVincent Michel <vincent.michel@logilab.fr>
changeset4491e020bca2
branchdefault
phasepublic
hiddenno
parent revision#a9a447c59ced [test] Fix typo in test
child revision#8978092150e7 [normalize] Remove deprecated "ignorennonascii" in unormalize, closes #187456
files modified by this revision
aligner.py
blocking.py
old_api.py
record_linkage/__init__.py
record_linkage/aligner.py
record_linkage/blocking.py
record_linkage/old_api.py
test/test_alignment.py
test/test_blocking.py
test/test_old_api.py
# HG changeset patch
# User Vincent Michel <vincent.michel@logilab.fr>
# Date 1387464062 0
# Thu Dec 19 14:41:02 2013 +0000
# Node ID 4491e020bca23bb038a177cea6fdd748db0b67c4
# Parent a9a447c59cedfa36834b457e8fdf2cb6d6a4fcc3
[nazca] Create a record linkage directory, related to #187461

diff --git a/record_linkage/__init__.py b/record_linkage/__init__.py
diff --git a/aligner.py b/record_linkage/aligner.py
diff --git a/blocking.py b/record_linkage/blocking.py
diff --git a/old_api.py b/record_linkage/old_api.py
@@ -26,13 +26,13 @@
1 
2  from scipy.sparse import lil_matrix
3 
4  from nazca.dataio import write_results, split_file, parsefile
5  from nazca.normalize import BaseNormalizer, NormalizerPipeline
6 -from nazca.blocking import KmeansBlocking, KdTreeBlocking, MinHashingBlocking
7  from nazca.distances import GeographicalProcessing
8 -from nazca.aligner import BaseAligner
9 +from nazca.record_linkage.aligner import BaseAligner
10 +from nazca.record_linkage.blocking import KmeansBlocking, KdTreeBlocking, MinHashingBlocking
11 
12 
13  # Backward compatibility. Now, use the BaseAligner inside the functions.
14  # Perhaps these functions may be removed later...
15 
diff --git a/test/test_alignment.py b/test/test_alignment.py
@@ -20,12 +20,12 @@
16  import random
17  random.seed(6) ### Make sure tests are repeatable
18  from os import path
19 
20  from nazca.normalize import simplify
21 -import nazca.aligner as alig
22 -import nazca.blocking as blo
23 +import nazca.record_linkage.aligner as alig
24 +import nazca.record_linkage.blocking as blo
25  from nazca.distances import LevenshteinProcessing, GeographicalProcessing
26 
27 
28  TESTDIR = path.dirname(__file__)
29 
diff --git a/test/test_blocking.py b/test/test_blocking.py
@@ -21,15 +21,15 @@
30  import random
31  random.seed(6) ### Make sure tests are repeatable / Minhashing
32 
33  from nazca.distances import (levenshtein, soundex, soundexcode,   \
34                               jaccard, euclidean, geographical)
35 -from nazca.blocking import (KeyBlocking, SortedNeighborhoodBlocking,
36 -                            MergeBlocking,
37 -                            NGramBlocking, PipelineBlocking,
38 -                            SoundexBlocking, KmeansBlocking,
39 -                            MinHashingBlocking, KdTreeBlocking)
40 +from nazca.record_linkage.blocking import (KeyBlocking, SortedNeighborhoodBlocking,
41 +                                           MergeBlocking,
42 +                                           NGramBlocking, PipelineBlocking,
43 +                                           SoundexBlocking, KmeansBlocking,
44 +                                           MinHashingBlocking, KdTreeBlocking)
45  from nazca.normalize import SimplifyNormalizer, loadlemmas
46 
47 
48  TESTDIR = path.dirname(__file__)
49 
diff --git a/test/test_old_api.py b/test/test_old_api.py
@@ -20,17 +20,17 @@
50  import random
51  random.seed(6) ### Make sure tests are repeatable
52  from os import path
53 
54  from nazca.normalize import loadlemmas, simplify
55 -from nazca.old_api import (normalize_set,
56 -                           findneighbours_clustering,
57 -                           findneighbours_kdtree,
58 -                           findneighbours_minhashing,
59 -                           align, subalign,
60 -                           conquer_and_divide_alignment,
61 -                           alignall, alignall_iterative)
62 +from nazca.record_linkage.old_api import (normalize_set,
63 +                                          findneighbours_clustering,
64 +                                          findneighbours_kdtree,
65 +                                          findneighbours_minhashing,
66 +                                          align, subalign,
67 +                                          conquer_and_divide_alignment,
68 +                                          alignall, alignall_iterative)
69 
70 
71  TESTDIR = path.dirname(__file__)
72 
73