Skip to content

Commit 967fc51

Browse files
committed
rename
1 parent 0e7f784 commit 967fc51

7 files changed

Lines changed: 31 additions & 30 deletions

File tree

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
cmake_minimum_required(VERSION 2.8)
2-
project(openspell)
2+
project(jamspell)
33

44
set(CMAKE_CXX_FLAGS "-std=c++11 -fPIC -g")
55

MANIFEST.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
graft openspell contrib
1+
graft jamspell contrib

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
# OpenSpell
1+
# JamSpell
22
WIP: Spell correction library

clear.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
rm -rf openspell.egg-info/ dist/ build/ openspell.py openspell.egg-info/ openspell_wrap.cpp _openspell.so
1+
#!/usr/bin/env bash
2+
rm -rf jamspell.egg-info/ dist/ build/ jamspell.py jamspell.egg-info/ jamspell_wrap.cpp _jamspell.so

evaluate/evaluate.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,11 @@ def correct(self, sentence, position):
8181
import context_spell_prototype
8282
return context_spell_prototype.correction(sentence, position)
8383

84-
class OpenspellCorrector(Corrector):
84+
class JamspellCorrector(Corrector):
8585
def __init__(self, modelFile):
86-
super(OpenspellCorrector, self).__init__()
87-
import openspell
88-
self.model = openspell.TSpellCorrector()
86+
super(JamspellCorrector, self).__init__()
87+
import jamspell
88+
self.model = jamspell.TSpellCorrector()
8989
if not (self.model.LoadLangModel(modelFile)):
9090
raise Exception('wrong model file: %s' % modelFile)
9191

@@ -194,7 +194,7 @@ def main():
194194
parser.add_argument('-ns', '--norvig', type=str, help='path to train file for Norvig spell corrector')
195195
parser.add_argument('-cs', '--context', type=str, help='path to context spell model')
196196
parser.add_argument('-csp', '--context_prototype', type=str, help='path to context spell prototype model')
197-
parser.add_argument('-osp', '--openspell', type=str, help='path to openspell model file')
197+
parser.add_argument('-jsp', '--jamspell', type=str, help='path to jamspell model file')
198198
parser.add_argument('-t', '--test', action="store_true")
199199
parser.add_argument('-mx', '--max_words', type=int, help='max words to evaluate')
200200
parser.add_argument('-a', '--alphabet', type=str, help='alphabet file')
@@ -224,8 +224,8 @@ def main():
224224
if args.context_prototype:
225225
corrector = correctors['prototype'] = ContextPrototypeCorrector(args.context_prototype)
226226

227-
if args.openspell:
228-
corrector = correctors['openspell'] = OpenspellCorrector(args.openspell)
227+
if args.jamspell:
228+
corrector = correctors['jamspell'] = JamspellCorrector(args.jamspell)
229229

230230
if args.test:
231231
return testMode(corrector)
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
%module openspell
1+
%module jamspell
22
%include "std_vector.i"
33
%include <std_string.i>
44
%include <std_wstring.i>
@@ -9,6 +9,6 @@ namespace std {
99
}
1010

1111
%{
12-
#include "openspell/spell_corrector.hpp"
12+
#include "jamspell/spell_corrector.hpp"
1313
%}
14-
%include "openspell/spell_corrector.hpp"
14+
%include "jamspell/spell_corrector.hpp"

setup.py

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,18 @@
1111

1212
this_dir = os.path.dirname(os.path.abspath(__file__))
1313

14-
openspell = Extension(
15-
name='_openspell',
16-
include_dirs=['.', 'openspell'],
14+
jamspell = Extension(
15+
name='_jamspell',
16+
include_dirs=['.', 'jamspell'],
1717
sources=[
18-
os.path.join('openspell', 'lang_model.cpp'),
19-
os.path.join('openspell', 'spell_corrector.cpp'),
20-
os.path.join('openspell', 'utils.cpp'),
21-
os.path.join('openspell', 'perfect_hash.cpp'),
22-
os.path.join('openspell', 'bloom_filter.cpp'),
18+
os.path.join('jamspell', 'lang_model.cpp'),
19+
os.path.join('jamspell', 'spell_corrector.cpp'),
20+
os.path.join('jamspell', 'utils.cpp'),
21+
os.path.join('jamspell', 'perfect_hash.cpp'),
22+
os.path.join('jamspell', 'bloom_filter.cpp'),
2323
os.path.join('contrib', 'cityhash', 'city.cc'),
2424
os.path.join('contrib', 'phf', 'phf.cc'),
25-
os.path.join('openspell.i'),
25+
os.path.join('jamspell.i'),
2626
],
2727
extra_compile_args=['-std=c++11', '-O2'],
2828
swig_opts=['-c++'],
@@ -46,24 +46,24 @@ def find_swig(self):
4646
assert subprocess.check_output([swigBinary, "-version"]).find('SWIG Version 3') != -1
4747
return swigBinary
4848

49-
VERSION = '0.0.5'
49+
VERSION = '0.0.6'
5050

5151
setup(
52-
name='openspell',
52+
name='jamspell',
5353
version=VERSION,
5454
author='Filipp Ozinov',
5555
author_email='fippo@mail.ru',
56-
url='https://github.com/bakwc/OpenSpell',
57-
download_url='https://github.com/bakwc/OpenSpell/tarball/' + VERSION,
56+
url='https://github.com/bakwc/JamSpell',
57+
download_url='https://github.com/bakwc/JamSpell/tarball/' + VERSION,
5858
description='spell checker',
5959
long_description='context-based spell checker',
60-
keywords=['nlp', 'spell', 'spell-checker'],
60+
keywords=['nlp', 'spell', 'spell-checker', 'jamspell'],
6161
classifiers=[
6262
'Programming Language :: Python :: 2.7',
6363
'License :: OSI Approved :: MIT License',
6464
],
65-
py_modules=['openspell'],
66-
ext_modules=[openspell],
65+
py_modules=['jamspell'],
66+
ext_modules=[jamspell],
6767
zip_safe=False,
6868
cmdclass={
6969
'build': CustomBuild,

0 commit comments

Comments
 (0)