[ner] Remove unused files and move tests, related to #187461

authorVincent Michel <vincent.michel@logilab.fr>
changeset61a56bf04d36
branchdefault
phasepublic
hiddenno
parent revision#e9b7a47e8d3e [old api] Remove deprecated old API, closes #197016
child revision#7019bc0cab44 [utils] Create an utils folder, related to #187461
files modified by this revision
ner/__pkginfo__.py
ner/debian/changelog
ner/debian/compat
ner/debian/control
ner/debian/copyright
ner/debian/rules
ner/python-nerdy.spec
ner/setup.py
ner/stopwords.py
ner/test/test_core.py
ner/test/test_dataio.py
ner/test/test_filter.py
ner/test/test_preprocessor.py
ner/test/test_tokenizer.py
reference_data/stopwords.py
reference_data/us_states.txt
test/test_core.py
test/test_filter.py
test/test_ner_dataio.py
test/test_preprocessor.py
test/test_tokenizer.py
# HG changeset patch
# User Vincent Michel <vincent.michel@logilab.fr>
# Date 1387464284 0
# Thu Dec 19 14:44:44 2013 +0000
# Node ID 61a56bf04d367baa4564f43e14612b7131ace3bf
# Parent e9b7a47e8d3e0333c193f24c291f1153b5b59003
[ner] Remove unused files and move tests, related to #187461

diff --git a/ner/__pkginfo__.py b/ner/__pkginfo__.py
@@ -1,39 +0,0 @@
1 -# -*- coding:utf-8 -*-
2 -# copyright 2013 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
3 -# contact http://www.logilab.fr -- mailto:contact@logilab.fr
4 -#
5 -# This program is free software: you can redistribute it and/or modify it under
6 -# the terms of the GNU Lesser General Public License as published by the Free
7 -# Software Foundation, either version 2.1 of the License, or (at your option)
8 -# any later version.
9 -#
10 -# This program is distributed in the hope that it will be useful, but WITHOUT
11 -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12 -# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
13 -# details.
14 -#
15 -# You should have received a copy of the GNU Lesser General Public License along
16 -# with this program. If not, see <http://www.gnu.org/licenses/>.
17 -"""Nerdy packaging information."""
18 -__docformat__ = "restructuredtext en"
19 -import sys
20 -
21 -distname = 'nerdy'
22 -modname = 'nerdy'
23 -
24 -numversion = (0, 1, 0)
25 -version = '.'.join([str(num) for num in numversion])
26 -
27 -license = 'LGPL' # 2.1 or later
28 -description = "Python library for data alignment"
29 -web = "https://www.logilab.org/project/nerdy"
30 -author = "Logilab"
31 -author_email = "contact@logilab.fr"
32 -
33 -
34 -from os.path import join
35 -scripts = []
36 -include_dirs = []
37 -
38 -if sys.version_info < (2, 7):
39 -    install_requires = ['unittest2 >= 0.5.1']
diff --git a/ner/debian/changelog b/ner/debian/changelog
@@ -1,6 +0,0 @@
40 -nerdy (0.1.0-1) unstable; urgency=low
41 -
42 -  * Initial release of the Nerdy package for Named Entities Recognition in Python.
43 -
44 - -- Vincent michel <Vincent.Michel@logilab.fr>  Tue, 11 Jun 2013 13:59:22 +0200
45 -
diff --git a/ner/debian/compat b/ner/debian/compat
@@ -1,1 +0,0 @@
46 -7
diff --git a/ner/debian/control b/ner/debian/control
@@ -1,12 +0,0 @@
47 -Source: nerdy
48 -Section: python
49 -Priority: optional
50 -Maintainer: LOGILAB S.A. (Paris, FRANCE) <contact@logilab.fr>
51 -Build-Depends: debhelper (>= 7), python (>=2.5), python-support
52 -Standards-Version: 3.9.3
53 -XS-Python-Version: >= 2.5
54 -
55 -Package: python-nerdy
56 -Architecture: all
57 -Depends: ${python:Depends}
58 -Description: Python library for Named Entities Recognition.
diff --git a/ner/debian/copyright b/ner/debian/copyright
@@ -1,8 +0,0 @@
59 -Upstream Author:
60 -
61 -  LOGILAB S.A. (Paris, FRANCE) <contact@logilab.fr>
62 -
63 -Copyright:
64 -
65 -Copyright (c) 2013 LOGILAB S.A. (Paris, FRANCE).
66 -http://www.logilab.fr -- mailto:contact@logilab.fr
diff --git a/ner/debian/rules b/ner/debian/rules
@@ -1,55 +0,0 @@
67 -#!/usr/bin/make -f
68 -# Sample debian/rules that uses debhelper.
69 -# GNU copyright 1997 to 1999 by Joey Hess.
70 -
71 -# Uncomment this to turn on verbose mode.
72 -#export DH_VERBOSE=1
73 -build: build-arch build-indep
74 -build-arch:
75 -	# Nothing to do
76 -build-indep: build-stamp
77 -build-stamp:
78 -	dh_testdir
79 -	NO_SETUPTOOLS=1 python setup.py -q build
80 -	touch build-stamp
81 -
82 -clean:
83 -	dh_testdir
84 -	dh_testroot
85 -	rm -f build-stamp configure-stamp
86 -	rm -rf build
87 -	find . -name "*.pyc" | xargs rm -f
88 -	dh_clean
89 -
90 -install: build
91 -	dh_testdir
92 -	dh_testroot
93 -	dh_clean -k
94 -	dh_installdirs -i
95 -	NO_SETUPTOOLS=1 python setup.py -q install --no-compile --prefix=debian/python-nerdy/usr/
96 -
97 -
98 -# Build architecture-independent files here.
99 -binary-indep: build install
100 -	dh_testdir
101 -	dh_testroot
102 -	dh_install -i
103 -	dh_installchangelogs -i
104 -	dh_installexamples -i
105 -	dh_installdocs -i
106 -	dh_installman -i
107 -	dh_pysupport -i
108 -	dh_link -i
109 -	dh_compress -i -X.py -X.ini -X.xml -Xtest
110 -	dh_fixperms -i
111 -	dh_installdeb -i
112 -	dh_gencontrol -i
113 -	dh_md5sums -i
114 -	dh_builddeb -i
115 -
116 -
117 -# Build architecture-dependent files here.
118 -binary-arch:
119 -
120 -binary: binary-indep
121 -.PHONY: build clean binary-arch binary-indep binary
diff --git a/ner/python-nerdy.spec b/ner/python-nerdy.spec
@@ -1,48 +0,0 @@
122 -%if 0%{?el5}
123 -%define python python26
124 -%define __python /usr/bin/python2.6
125 -%{!?python_scriptarch: %define python_scriptarch %(%{__python} -c "from distutils.sysconfig import get_python_lib; from os.path import join; print join(get_python_lib(1, 1), 'scripts')")}
126 -%else
127 -%define python python
128 -%define __python /usr/bin/python
129 -%endif
130 -
131 -Name:           %{python}-nerdy
132 -Version:        0.1.0
133 -Release:        logilab.1%{?dist}
134 -Summary:        Python library for data alignment
135 -Group:          Development/Languages/Python
136 -License:        LGPL
137 -Source0:        nerdy-%{version}.tar.gz
138 -
139 -BuildArch:      noarch
140 -BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-buildroot
141 -
142 -BuildRequires:  %{python}
143 -Requires:       %{python}, %{python}-lxml
144 -
145 -
146 -%description
147 -entity / relation schema
148 -
149 -%prep
150 -%setup -q -n nerdy-%{version}
151 -
152 -%build
153 -%{__python} setup.py build
154 -%if 0%{?el5}
155 -# change the python version in shebangs
156 -find . -name '*.py' -type f -print0 |  xargs -0 sed -i '1,3s;^#!.*python.*$;#! /usr/bin/python2.6;'
157 -%endif
158 -
159 -%install
160 -rm -rf $RPM_BUILD_ROOT
161 -NO_SETUPTOOLS=1 %{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT %{?python_scriptarch: --install-scripts=%{python_scriptarch}}
162 -
163 -%clean
164 -rm -rf $RPM_BUILD_ROOT
165 -
166 -%files 
167 -%defattr(-, root, root)
168 -/*
169 -
diff --git a/ner/setup.py b/ner/setup.py
@@ -1,27 +0,0 @@
170 -# -*- coding:utf-8 -*-
171 -# copyright 2013 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
172 -# contact http://www.logilab.fr -- mailto:contact@logilab.fr
173 -#
174 -# This program is free software: you can redistribute it and/or modify it under
175 -# the terms of the GNU Lesser General Public License as published by the Free
176 -# Software Foundation, either version 2.1 of the License, or (at your option)
177 -# any later version.
178 -#
179 -# This program is distributed in the hope that it will be useful, but WITHOUT
180 -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
181 -# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
182 -# details.
183 -#
184 -# You should have received a copy of the GNU Lesser General Public License along
185 -# with this program. If not, see <http://www.gnu.org/licenses/>.
186 -from distutils.core import setup
187 -
188 -setup(name='nerdy',
189 -      version='0.1.0',
190 -      description='Python library for data alignment',
191 -      author='LOGILAB S.A. (Paris, FRANCE)',
192 -      author_email=' <contact@logilab.fr>',
193 -      url='https://www.logilab.org/project/nerdy',
194 -      package_dir={'nerdy': '.'},
195 -      packages=['nerdy'],
196 -     )
diff --git a/ner/stopwords.py b/reference_data/stopwords.py
diff --git a/reference_data/us_states.txt b/reference_data/us_states.txt
@@ -1,210 +0,0 @@
197 -
198 -# See http://en.wikipedia.org/wiki/List_of_U.S._state_abbreviations
199 -# WARNING: The name of each state should be in French
200 -# (e.g. "Floride", not "Florida")
201 -US_STATES = {'AK': 'Alaska',
202 -             'AL': 'Alabama',
203 -             'AR': 'Arkansas',
204 -             'AZ': 'Arizona',
205 -             'Ala.': 'Alabama',
206 -             'Alas.': 'Alaska',
207 -             'Alaska': 'Alaska',
208 -             'Ariz.': 'Arizona',
209 -             'Ark.': 'Arkansas',
210 -             'Az.': 'Arizona',
211 -             'CA': 'Californie',
212 -             'CF': 'Californie',
213 -             'CL': 'Colorado',
214 -             'CO': 'Colorado',
215 -             'CT': 'Connecticut',
216 -             'Ca.': 'Californie',
217 -             'Cal.': 'Californie',
218 -             'Cali.': 'Californie',
219 -             'Calif.': 'Californie',
220 -             'Col.': 'Colorado',
221 -             'Colo.': 'Colorado',
222 -             'Conn.': 'Connecticut',
223 -             'Ct.': 'Connecticut',
224 -             'D.C.': 'District of ColuFederal district',
225 -             'DC': 'District of ColuFederal district',
226 -             'DE': 'Delaware',
227 -             'DL': 'Delaware',
228 -             'De.': 'Delaware',
229 -             'Del.': 'Delaware',
230 -             'FL': 'Floride',
231 -             'Fl.': 'Floride',
232 -             'Fla.': 'Floride',
233 -             'Flor.': 'Floride',
234 -             'GA': u'Géorgie',
235 -             'Ga.': u'Géorgie',
236 -             'H.I.': 'Hawaii',
237 -             'HA': 'Hawaii',
238 -             'HI': 'Hawaii',
239 -             'Hawaii': 'Hawaii',
240 -             'IA': 'Iowa',
241 -             'ID': 'Idaho',
242 -             'IL': 'Illinois',
243 -             'IN': 'Indiana',
244 -             'Ia.': 'Iowa',
245 -             'Id.': 'Idaho',
246 -             'Ida.': 'Idaho',
247 -             'Idaho': 'Idaho',
248 -             'Il.': 'Illinois',
249 -             "Ill's": 'Illinois',
250 -             'Ill.': 'Illinois',
251 -             'Ills.': 'Illinois',
252 -             'In.': 'Indiana',
253 -             'Ind.': 'Indiana',
254 -             'Ioa.': 'Iowa',
255 -             'Iowa': 'Iowa',
256 -             'KA': 'Kansas',
257 -             'KS': 'Kansas',
258 -             'KY': 'Kentucky',
259 -             'Ka.': 'Kansas',
260 -             'Kan.': 'Kansas',
261 -             'Kans.': 'Kansas',
262 -             'Ks.': 'Kansas',
263 -             'Ky.': 'Kentucky',
264 -             'LA': 'Louisiane',
265 -             'La.': 'Louisiane',
266 -             'MA': 'Massachusetts',
267 -             'MC': 'Michigan',
268 -             'MD': 'Maryland',
269 -             'ME': 'Maine',
270 -             'MI': 'Mississippi',
271 -             'MN': 'Minnesota',
272 -             'MO': 'Missouri',
273 -             'MS': 'Mississippi',
274 -             'MT': 'Montana',
275 -             'Maine': 'Maine',
276 -             'Mass.': 'Massachusetts',
277 -             'Md.': 'Maryland',
278 -             'Me.': 'Maine',
279 -             'Mich.': 'Michigan',
280 -             'Minn.': 'Minnesota',
281 -             'Miss.': 'Mississippi',
282 -             'Mn.': 'Minnesota',
283 -             'Mo.': 'Missouri',
284 -             'Mont.': 'Montana',
285 -             'N. Car.': 'Caroline du Nord',
286 -             'N. Dak.': 'Dakota du Nord',
287 -             'N. Mex.': 'Nouveau-Mexique',
288 -             'N. York': 'New York',
289 -             'N.C.': 'Caroline du Nord',
290 -             'N.D.': 'Dakota du Nord',
291 -             'N.H.': 'New Hampshire',
292 -             'N.J.': 'New Jersey',
293 -             'N.M.': 'Nouveau-Mexique',
294 -             'N.Y.': 'New York',
295 -             'NB': 'Nebraska',
296 -             'NC': 'Caroline du Nord',
297 -             'ND': 'Dakota du Nord',
298 -             'NE': 'Nebraska',
299 -             'NH': 'New Hampshire',
300 -             'NJ': 'New Jersey',
301 -             'NM': 'Nouveau-Mexique',
302 -             'NV': 'Nevada',
303 -             'NY': 'New York',
304 -             'Neb.': 'Nebraska',
305 -             'Nebr.': 'Nebraska',
306 -             'Nev.': 'Nevada',
307 -             'New M.': 'Nouveau-Mexique',
308 -             'NoDak': 'Dakota du Nord',
309 -             'Nv.': 'Nevada',
310 -             'O.': 'Ohio',
311 -             'OH': 'Ohio',
312 -             'OK': 'Oklahoma',
313 -             'OR': 'Oregon',
314 -             'Oh.': 'Ohio',
315 -             'Ohio': 'Ohio',
316 -             'Ok.': 'Oklahoma',
317 -             'Okla.': 'Oklahoma',
318 -             'Or.': 'Oregon',
319 -             'Ore.': 'Oregon',
320 -             'Oreg.': 'Oregon',
321 -             'PA': 'Pennsylvanie',
322 -             'Pa.': 'Pennsylvanie',
323 -             'R.I.': 'Rhode Island',
324 -             'R.I. & P.P.': 'Rhode Island',
325 -             'RI': 'Rhode Island',
326 -             'S. Car.': 'Caroline du Sud',
327 -             'S. Dak.': 'Dakota du Sud',
328 -             'S.C.': 'Caroline du Sud',
329 -             'S.D.': 'Dakota du Sud',
330 -             'SC': 'Caroline du Sud',
331 -             'SD': 'Dakota du Sud',
332 -             'SoDak': 'Dakota du Sud',
333 -             'State': 'Utah',
334 -             'TN': 'Tennessee',
335 -             'TX': 'Texas',
336 -             'Tenn.': 'Tennessee',
337 -             'Tex.': 'Texas',
338 -             'Texas': 'Texas',
339 -             'Tn.': 'Tennessee',
340 -             'Tx.': 'Texas',
341 -             'US-AL': 'Alabama',
342 -             'US-AR': 'Arkansas',
343 -             'US-AZ': 'Arizona',
344 -             'US-CA': 'Californie',
345 -             'US-CO': 'Colorado',
346 -             'US-CT': 'Connecticut',
347 -             'US-DC': 'District of ColuFederal district',
348 -             'US-DE': 'Delaware',
349 -             'US-FL': 'Floride',
350 -             'US-GA': u'Géorgie',
351 -             'US-IL': 'Illinois',
352 -             'US-IN': 'Indiana',
353 -             'US-KY': 'Kentucky',
354 -             'US-LA': 'Louisiane',
355 -             'US-MA': 'Massachusetts',
356 -             'US-MD': 'Maryland',
357 -             'US-MI': 'Michigan',
358 -             'US-MN': 'Minnesota',
359 -             'US-MO': 'Missouri',
360 -             'US-MS': 'Mississippi',
361 -             'US-MT': 'Montana',
362 -             'US-NC': 'Caroline du Nord',
363 -             'US-ND': 'Dakota du Nord',
364 -             'US-NE': 'Nebraska',
365 -             'US-NH': 'New Hampshire',
366 -             'US-NJ': 'New Jersey',
367 -             'US-NM': 'Nouveau-Mexique',
368 -             'US-NY': 'New York',
369 -             'US-OK': 'Oklahoma',
370 -             'US-PA': 'Pennsylvanie',
371 -             'US-RI': 'Rhode Island',
372 -             'US-SC': 'Caroline du Sud',
373 -             'US-SD': 'Dakota du Sud',
374 -             'US-TN': 'Tennessee',
375 -             'US-VA': 'Virginia',
376 -             'US-VT': 'Vermont',
377 -             'US-WA': 'Washington',
378 -             'US-WI': 'Wisconsin',
379 -             'US-WV': 'Virginie occidentale',
380 -             'US-WY': 'Wyoming',
381 -             'UT': 'Utah',
382 -             'Ut.': 'Utah',
383 -             'Utah': 'Utah',
384 -             'VA': 'Virginia',
385 -             'VT': 'Vermont',
386 -             'Va.': 'Virginia',
387 -             'Vt.': 'Vermont',
388 -             'W. Va.': 'Virginie occidentale',
389 -             'W. Virg.': 'Virginie occidentale',
390 -             'W.V.': 'Virginie occidentale',
391 -             'W.Va.': 'Virginie occidentale',
392 -             'WA': 'Washington',
393 -             'WI': 'Wisconsin',
394 -             'WN': 'Washington',
395 -             'WS': 'Wisconsin',
396 -             'WV': 'Virginie occidentale',
397 -             'WY': 'Wyoming',
398 -             'Wa.': 'Washington',
399 -             'Wash.': 'Washington',
400 -             'Wash. D.C.': 'District of ColuFederal district',
401 -             'Wi.': 'Wisconsin',
402 -             'Wis.': 'Wisconsin',
403 -             'Wisc.': 'Wisconsin',
404 -             'Wn.': 'Washington',
405 -             'Wy.': 'Wyoming',
406 -             'Wyo.': 'Wyoming'}
diff --git a/ner/test/test_core.py b/test/test_core.py
diff --git a/ner/test/test_filter.py b/test/test_filter.py
diff --git a/ner/test/test_dataio.py b/test/test_ner_dataio.py
diff --git a/ner/test/test_preprocessor.py b/test/test_preprocessor.py
diff --git a/ner/test/test_tokenizer.py b/test/test_tokenizer.py