Giter VIP home page Giter VIP logo

jamspell's Introduction

JamSpell

Build Status Release

JamSpell is a spell checking library with following features:

  • accurate - it considers words surroundings (context) for better correction
  • fast - near 5K words per second
  • multi-language - it's written in C++ and available for many languages with swig bindings

Colab example

JamSpellPro

jamspell.com - check out a new jamspell version with following features

  • Improved accuracy (catboost gradient boosted decision trees candidates ranking model)
  • Splits merged words
  • Pre-trained models for many languages (small, medium, large) for:
    en, ru, de, fr, it, es, tr, uk, pl, nl, pt, hi, no
  • Ability to add words / sentences at runtime
  • Fine-tuning / additional training
  • Memory optimization for training large models
  • Static dictionary support
  • Built-in Java, C#, Ruby support
  • Windows support

Content

Benchmarks

Errors Top 7 Errors Fix Rate Top 7 Fix Rate Broken Speed
(words/second)
JamSpell 3.25% 1.27% 79.53% 84.10% 0.64% 4854
Norvig 7.62% 5.00% 46.58% 66.51% 0.69% 395
Hunspell 13.10% 10.33% 47.52% 68.56% 7.14% 163
Dummy 13.14% 13.14% 0.00% 0.00% 0.00% -

Model was trained on 300K wikipedia sentences + 300K news sentences (english). 95% was used for train, 5% was used for evaluation. Errors model was used to generate errored text from the original one. JamSpell corrector was compared with Norvig's one, Hunspell and a dummy one (no corrections).

We used following metrics:

  • Errors - percent of words with errors after spell checker processed
  • Top 7 Errors - percent of words missing in top7 candidated
  • Fix Rate - percent of errored words fixed by spell checker
  • Top 7 Fix Rate - percent of errored words fixed by one of top7 candidates
  • Broken - percent of non-errored words broken by spell checker
  • Speed - number of words per second

To ensure that our model is not too overfitted for wikipedia+news we checked it on "The Adventures of Sherlock Holmes" text:

Errors Top 7 Errors Fix Rate Top 7 Fix Rate Broken Speed (words per second)
JamSpell 3.56% 1.27% 72.03% 79.73% 0.50% 5524
Norvig 7.60% 5.30% 35.43% 56.06% 0.45% 647
Hunspell 9.36% 6.44% 39.61% 65.77% 2.95% 284
Dummy 11.16% 11.16% 0.00% 0.00% 0.00% -

More details about reproducing available in "Train" section.

Usage

Python

  1. Install swig3 (usually it is in your distro package manager)

  2. Install jamspell:

pip install jamspell
  1. Download or train language model

  2. Use it:

import jamspell

corrector = jamspell.TSpellCorrector()
corrector.LoadLangModel('en.bin')

corrector.FixFragment('I am the begt spell cherken!')
# u'I am the best spell checker!'

corrector.GetCandidates(['i', 'am', 'the', 'begt', 'spell', 'cherken'], 3)
# (u'best', u'beat', u'belt', u'bet', u'bent', ... )

corrector.GetCandidates(['i', 'am', 'the', 'begt', 'spell', 'cherken'], 5)
# (u'checker', u'chicken', u'checked', u'wherein', u'coherent', ...)

C++

  1. Add jamspell and contrib dirs to your project

  2. Use it:

#include <jamspell/spell_corrector.hpp>

int main(int argc, const char** argv) {

    NJamSpell::TSpellCorrector corrector;
    corrector.LoadLangModel("model.bin");

    corrector.FixFragment(L"I am the begt spell cherken!");
    // "I am the best spell checker!"

    corrector.GetCandidates({L"i", L"am", L"the", L"begt", L"spell", L"cherken"}, 3);
    // "best", "beat", "belt", "bet", "bent", ... )

    corrector.GetCandidates({L"i", L"am", L"the", L"begt", L"spell", L"cherken"}, 3);
    // "checker", "chicken", "checked", "wherein", "coherent", ... )
    return 0;
}

Other languages

You can generate extensions for other languages using swig tutorial. The swig interface file is jamspell.i. Pull requests with build scripts are welcome.

HTTP API

  • Install cmake

  • Clone and build jamspell (it includes http server):

git clone https://github.com/bakwc/JamSpell.git
cd JamSpell
mkdir build
cd build
cmake ..
make
./web_server/web_server en.bin localhost 8080
  • GET Request example:
$ curl "http://localhost:8080/fix?text=I am the begt spell cherken"
I am the best spell checker
  • POST Request example
$ curl -d "I am the begt spell cherken" http://localhost:8080/fix
I am the best spell checker
  • Candidate example
curl "http://localhost:8080/candidates?text=I am the begt spell cherken"
# or
curl -d "I am the begt spell cherken" http://localhost:8080/candidates
{
    "results": [
        {
            "candidates": [
                "best",
                "beat",
                "belt",
                "bet",
                "bent",
                "beet",
                "beit"
            ],
            "len": 4,
            "pos_from": 9
        },
        {
            "candidates": [
                "checker",
                "chicken",
                "checked",
                "wherein",
                "coherent",
                "cheered",
                "cherokee"
            ],
            "len": 7,
            "pos_from": 20
        }
    ]
}

Here pos_from - misspelled word first letter position, len - misspelled word len

Train

To train custom model you need:

  1. Install cmake

  2. Clone and build jamspell:

git clone https://github.com/bakwc/JamSpell.git
cd JamSpell
mkdir build
cd build
cmake ..
make
  1. Prepare a utf-8 text file with sentences to train at (eg. sherlockholmes.txt) and another file with language alphabet (eg. alphabet_en.txt)

  2. Train model:

./main/jamspell train ../test_data/alphabet_en.txt ../test_data/sherlockholmes.txt model_sherlock.bin
  1. To evaluate spellchecker you can use evaluate/evaluate.py script:
python evaluate/evaluate.py -a alphabet_file.txt -jsp your_model.bin -mx 50000 your_test_data.txt
  1. You can use evaluate/generate_dataset.py to generate you train/test data. It supports txt files, Leipzig Corpora Collection format and fb2 books.

Download models

Here is a few simple models. They trained on 300K news + 300k wikipedia sentences. We strongly recommend to train your own model, at least on a few million sentences to achieve better quality. See Train section above.

jamspell's People

Contributors

bakwc avatar deniskore avatar dngros avatar jeancsil avatar narkq avatar nikolaik avatar reefactor avatar rqvolkov avatar stigjb avatar szepeviktor avatar tigitz avatar tizz98 avatar vjaysln avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jamspell's Issues

Split words

I noticed that the library doesn't split words, like in: "Can you readthis message?"

Will it have support for cross-word corrections?

Windows 10 pip install failed

Windows 10, pip 10, python 3.5

GCC drops an error during pip install jamspell on windows:

error: 'long int NJamSpell::MemStream::xsputn(const char*, long int)' marked 'override', but does not override

Building from source also failed as no makefile being created while building.

Is Win10 supported?

Error while installing Jamspell on Python3.7

Hi,
I'm trying to install Jamspell, but an AssertionError occurs after running 'assert swigBinary is not None' and the following error appears:

Command "c:\users\mozhdeh\appdata\local\programs\python\python37\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\Mozhdeh\\AppData\\Local\\Temp\\pip-install-yeklct7v\\jamspell\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\Mozhdeh\AppData\Local\Temp\pip-record-somxdjnu\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\Mozhdeh\AppData\Local\Temp\pip-install-yeklct7v\jamspell\

I also tried to install it on python2 and 3.6, but the same error occured.

Would you please help me? I'm very eager to use JamSpell in my project.
Thanks in advance :)

Cannot install jamspell

I am using the Anaconda distribution, Python 3.6, 64-bit on a Windows 7 machine.

I have installed swig, version 3.

when I do pip install jamspell, I get back an error and I haven't a clue how to fix this. I've tried various PYTHONPATH but none worked. Help would be very much appreciated.

  c:\anaconda3_64\pythonw.exe -E -c pass
  TEST FAILED: build\bdist.win-amd64\wheel\.\ does NOT support .pth files
  error: bad install directory or PYTHONPATH

  You are attempting to install a package to a directory that is not
  on PYTHONPATH and which Python does not read ".pth" files from.  The
  installation directory you specified (via --install-dir, --prefix, or
  the distutils default setting) was:

      build\bdist.win-amd64\wheel\.\

  and your PYTHONPATH environment variable currently contains:

      'c:\\Anaconda3_64\\Lib'

  Here are some of your options for correcting the problem:

  * You can choose a different installation directory, i.e., one that is
    on PYTHONPATH or supports .pth files

  * You can add the installation directory to the PYTHONPATH environment
    variable.  (It must then also be on PYTHONPATH whenever you run
    Python and want to use the package(s) you are installing.)

  * You can set up the installation directory to support ".pth" files by
    using one of the approaches described here:

    https://setuptools.readthedocs.io/en/latest/easy_install.html#custom-installation-locations


  Please make the appropriate changes for your system and try again.

Unable to install in Mac

After installing swig, I get following error on pip install jamspell in mac. On ubuntu system it worked though.

Collecting jamspell
  Using cached https://files.pythonhosted.org/packages/5a/16/0a808e926a835604007066085cb2183b337694a06240a99945b31fa14f27/jamspell-0.0.11.tar.gz
Building wheels for collected packages: jamspell
  Running setup.py bdist_wheel for jamspell ... error
  Complete output from command /Users/harshtrivedi/anaconda2/envs/allennlp051/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/rf/trsjb3rx16df30mj3f4j_xxm0000gn/T/pip-install-n3pybnje/jamspell/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /private/var/folders/rf/trsjb3rx16df30mj3f4j_xxm0000gn/T/pip-wheel-2cy6892v --python-tag cp36:
  running bdist_wheel
  running build
  running build_ext
  building '_jamspell' extension
  swigging jamspell.i to jamspell_wrap.cpp
  /Users/harshtrivedi/anaconda2/envs/allennlp051/bin/swig -python -c++ -o jamspell_wrap.cpp jamspell.i
  creating build
  creating build/temp.macosx-10.7-x86_64-3.6
  creating build/temp.macosx-10.7-x86_64-3.6/jamspell
  creating build/temp.macosx-10.7-x86_64-3.6/contrib
  creating build/temp.macosx-10.7-x86_64-3.6/contrib/cityhash
  creating build/temp.macosx-10.7-x86_64-3.6/contrib/phf
  gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/harshtrivedi/anaconda2/envs/allennlp051/include -arch x86_64 -I/Users/harshtrivedi/anaconda2/envs/allennlp051/include -arch x86_64 -I. -Ijamspell -I/Users/harshtrivedi/anaconda2/envs/allennlp051/include/python3.6m -c jamspell/lang_model.cpp -o build/temp.macosx-10.7-x86_64-3.6/jamspell/lang_model.o -std=c++11 -O2
  In file included from jamspell/lang_model.cpp:9:
  jamspell/lang_model.hpp:3:10: fatal error: 'unordered_map' file not found
  #include <unordered_map>
           ^
  1 error generated.
  error: command 'gcc' failed with exit status 1

  ----------------------------------------
  Failed building wheel for jamspell
  Running setup.py clean for jamspell
Failed to build jamspell
Installing collected packages: jamspell
  Running setup.py install for jamspell ... error
    Complete output from command /Users/harshtrivedi/anaconda2/envs/allennlp051/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/rf/trsjb3rx16df30mj3f4j_xxm0000gn/T/pip-install-n3pybnje/jamspell/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /private/var/folders/rf/trsjb3rx16df30mj3f4j_xxm0000gn/T/pip-record-evaofjjm/install-record.txt --single-version-externally-managed --compile:
    running install
    running build_ext
    building '_jamspell' extension
    swigging jamspell.i to jamspell_wrap.cpp
    /Users/harshtrivedi/anaconda2/envs/allennlp051/bin/swig -python -c++ -o jamspell_wrap.cpp jamspell.i
    creating build
    creating build/temp.macosx-10.7-x86_64-3.6
    creating build/temp.macosx-10.7-x86_64-3.6/jamspell
    creating build/temp.macosx-10.7-x86_64-3.6/contrib
    creating build/temp.macosx-10.7-x86_64-3.6/contrib/cityhash
    creating build/temp.macosx-10.7-x86_64-3.6/contrib/phf
    gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/harshtrivedi/anaconda2/envs/allennlp051/include -arch x86_64 -I/Users/harshtrivedi/anaconda2/envs/allennlp051/include -arch x86_64 -I. -Ijamspell -I/Users/harshtrivedi/anaconda2/envs/allennlp051/include/python3.6m -c jamspell/lang_model.cpp -o build/temp.macosx-10.7-x86_64-3.6/jamspell/lang_model.o -std=c++11 -O2
    In file included from jamspell/lang_model.cpp:9:
    jamspell/lang_model.hpp:3:10: fatal error: 'unordered_map' file not found
    #include <unordered_map>
             ^
    1 error generated.
    error: command 'gcc' failed with exit status 1

    ----------------------------------------
Command "/Users/harshtrivedi/anaconda2/envs/allennlp051/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/rf/trsjb3rx16df30mj3f4j_xxm0000gn/T/pip-install-n3pybnje/jamspell/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /private/var/folders/rf/trsjb3rx16df30mj3f4j_xxm0000gn/T/pip-record-evaofjjm/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/rf/trsjb3rx16df30mj3f4j_xxm0000gn/T/pip-install-n3pybnje/jamspell/

Any suggestions?

Raise exception with message instead of False

I downloaded "ru" model and execute such code:

Python 2.7.14 (default, Jan 23 2018, 15:32:14) 
[GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.39.2)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import jamspell
>>> corrector = jamspell.TSpellCorrector()
>>> corrector.LoadLangModel('~/Downloads/ru_small.bin')
False
>>> x = corrector.FixFragment(u'Превет, каг дела?')
>>> print(x)
Превет, каг дела?

It seems to be an error during model loading.
Model file exist

$ ls -l ~/Downloads/ru_small.bin
-rw-r--r--  1 alex  admin  81159179 19 янв 00:20 /Users/alex/Downloads/ru_small.bin

codecvt on centos7

Hi I'm trying to run it on centos7 and got into troubles because of old GCC:

Collecting jamspell
  Using cached jamspell-0.0.9.tar.gz
Installing collected packages: jamspell
  Running setup.py install for jamspell ... error
    Complete output from command /usr/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-7el5wdyq/jamspell/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-nnxiiav4-record/install-record.txt --single-version-externally-managed --compile:
    running install
    running build_ext
    building '_jamspell' extension
    swigging jamspell.i to jamspell_wrap.cpp
    /bin/swig -python -c++ -o jamspell_wrap.cpp jamspell.i
    creating build
    creating build/temp.linux-x86_64-3.6
    creating build/temp.linux-x86_64-3.6/jamspell
    creating build/temp.linux-x86_64-3.6/contrib
    creating build/temp.linux-x86_64-3.6/contrib/cityhash
    creating build/temp.linux-x86_64-3.6/contrib/phf
    gcc -pthread -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I. -Ijamspell -I/usr/include/python3.6m -c jamspell/lang_model.cpp -o build/temp.linux-x86_64-3.6/jamspell/lang_model.o -std=c++11 -O2
    gcc -pthread -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I. -Ijamspell -I/usr/include/python3.6m -c jamspell/spell_corrector.cpp -o build/temp.linux-x86_64-3.6/jamspell/spell_corrector.o -std=c++11 -O2
    gcc -pthread -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I. -Ijamspell -I/usr/include/python3.6m -c jamspell/utils.cpp -o build/temp.linux-x86_64-3.6/jamspell/utils.o -std=c++11 -O2
    jamspell/utils.cpp:3:19: fatal error: codecvt: No such file or directory
     #include <codecvt>
                       ^
    compilation terminated.
    error: command 'gcc' failed with exit status 1
    
    ----------------------------------------
Command "/usr/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-7el5wdyq/jamspell/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-nnxiiav4-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-7el5wdyq/jamspell/
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.8.5/lto-wrapper
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin --enable-initfini-array --disable-libgcj --with-isl=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/cloog-install --enable-gnu-indirect-function --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.8.5 20150623 (Red Hat 4.8.5-16) (GCC) 

Any suggestions or workarounds?
Can I replace or disable usage of codecvt ?

Build fails on Ubuntu 14.04 with "codecvt: No such file or directory"

Hi!

Tried to install JamSpell on Ubuntu with pip install jamspell which ended with error

jamspell/utils.cpp:12:23: fatal error: codecvt: No such file or directory

Any suggestion how to overcome this thing? Did research, but found a mess with different C++ versions, standards, compilers and not sure if code update is required or some other work-around exists.

Many thanks for your advice!

Failed building wheel for jamspell Windows 10

Hi!
Trying to install jamspell on windows 10, and getting an error
Full log
Building wheels for collected packages: jamspell
Running setup.py bdist_wheel for jamspell ... error
Complete output from command c:\anaconda3\python.exe -u -c "import setuptools, tokenize;file='C:\Users\blago\AppData\Local\Temp\pip-install-kwnezrz5\jamspell\setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" bdist_wheel -d C:\Users\blago\AppData\Local\Temp\pip-wheel-wwi_ejm1 --python-tag cp36:
running bdist_wheel
running build
running build_ext
building '_jamspell' extension
swigging jamspell.i to jamspell_wrap.cpp
c:\anaconda3\Library\bin\swig.exe -python -c++ -o jamspell_wrap.cpp jamspell.i
creating build
creating build\temp.win-amd64-3.6
creating build\temp.win-amd64-3.6\Release
creating build\temp.win-amd64-3.6\Release\jamspell
creating build\temp.win-amd64-3.6\Release\contrib
creating build\temp.win-amd64-3.6\Release\contrib\cityhash
creating build\temp.win-amd64-3.6\Release\contrib\phf
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.13.26128\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -I. -Ijamspell -Ic:\anaconda3\include -Ic:\anaconda3\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.13.26128\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.13.26128\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\cppwinrt" /EHsc /Tpjamspell\lang_model.cpp /Fobuild\temp.win-amd64-3.6\Release\jamspell\lang_model.obj -std=c++11 -O2
cl: командная строка warning D9002: пропуск неизвестного параметра "-std=c++11"
lang_model.cpp
jamspell\lang_model.cpp(155): warning C4267: =: преобразование из "size_t" в "NJamSpell::TWordId"; возможна потеря данных
.\contrib/handypack/handypack.hpp(134): warning C4267: инициализация: преобразование из "size_t" в "uint32_t"; возможна потеря данных
.\contrib/handypack/handypack.hpp(133): note: при компиляции функции-члена "<Нет данных>" класса класс <Нет данных>
c:\users\blago\appdata\local\temp\pip-install-kwnezrz5\jamspell\jamspell\lang_model.hpp(51): note: выполняется компиляция ссылки на экземпляр шаблон функции "void NHandyPack::TUnorderedMapSerializer<tsl::robin_map<std::wstring,NJamSpell::TWordId,std::hash,std::equal_to,std::allocator<std::pair<Key,T>>,false,tsl::rh::power_of_two_growth_policy<2>>,std::wstring,NJamSpell::TWordId>::Dump(std::ostream &,const TVec &)"
with
[
Key=std::wstring,
T=NJamSpell::TWordId,
TVec=tsl::robin_map<std::wstring,NJamSpell::TWordId,std::hashstd::wstring,std::equal_tostd::wstring,std::allocator<std::pairstd::wstring,NJamSpell::TWordId>,false,tsl::rh::power_of_two_growth_policy<2>>
]
c:\users\blago\appdata\local\temp\pip-install-kwnezrz5\jamspell\jamspell\lang_model.hpp(47): note: выполняется компиляция ссылки на экземпляр шаблон класс "NHandyPack::TUnorderedMapSerializer<tsl::robin_map<std::wstring,NJamSpell::TWordId,std::hash,std::equal_to,std::allocator<std::pair<Key,T>>,false,tsl::rh::power_of_two_growth_policy<2>>,std::wstring,NJamSpell::TWordId>"
with
[
Key=std::wstring,
T=NJamSpell::TWordId
]
c:\users\blago\appdata\local\temp\pip-install-kwnezrz5\jamspell\contrib\tsl\robin_growth_policy.h(186): note: выполняется компиляция ссылки на экземпляр шаблон класс "std::array<::size_t,39>"
.\contrib/handypack/handypack.hpp(158): warning C4267: инициализация: преобразование из "size_t" в "uint32_t"; возможна потеря данных
.\contrib/handypack/handypack.hpp(157): note: при компиляции функции-члена "<Нет данных>" класса класс <Нет данных>
.\contrib/handypack/handypack.hpp(202): note: выполняется компиляция ссылки на экземпляр шаблон функции "void NHandyPack::TSetSerializer<std::unordered_set<wchar_t,std::hash<_Kty>,std::equal_to<_Kty>,std::allocator<wchar_t>>,T>::Dump(std::ostream &,const TVec &)"
with
[
_Kty=wchar_t,
T=wchar_t,
TVec=std::unordered_set<wchar_t,std::hash<wchar_t>,std::equal_to<wchar_t>,std::allocator<wchar_t>>
]
.\contrib/handypack/handypack.hpp(184): note: выполняется компиляция ссылки на экземпляр шаблон класс "NHandyPack::TSetSerializer<std::unordered_set<wchar_t,std::hash<_Kty>,std::equal_to<_Kty>,std::allocator<wchar_t>>,T>"
with
[
_Kty=wchar_t,
T=wchar_t
]
.\contrib/handypack/handypack.hpp(202): note: выполняется компиляция ссылки на экземпляр шаблон класс "NHandyPack::TSerializer<T,void>"
with
[
T=std::unordered_set<wchar_t,std::hash<wchar_t>,std::equal_to<wchar_t>,std::allocator<wchar_t>>
]
c:\users\blago\appdata\local\temp\pip-install-kwnezrz5\jamspell\jamspell\utils.hpp(50): note: выполняется компиляция ссылки на экземпляр шаблон функции "void NHandyPack::Dump<std::unordered_set<wchar_t,std::hash<_Kty>,std::equal_to<_Kty>,std::allocator<wchar_t>>>(std::ostream &,const T &)"
with
[
_Kty=wchar_t,
T=std::unordered_set<wchar_t,std::hash<wchar_t>,std::equal_to<wchar_t>,std::allocator<wchar_t>>
]
.\contrib/handypack/handypack.hpp(87): warning C4267: инициализация: преобразование из "size_t" в "uint32_t"; возможна потеря данных
.\contrib/handypack/handypack.hpp(86): note: при компиляции функции-члена "<Нет данных>" класса класс <Нет данных>
.\contrib/handypack/handypack.hpp(202): note: выполняется компиляция ссылки на экземпляр шаблон функции "void NHandyPack::TVectorSerializerstd::wstring,wchar_t::Dump(std::ostream &,const TVec &)"
with
[
TVec=std::wstring
]
.\contrib/handypack/handypack.hpp(180): note: выполняется компиляция ссылки на экземпляр шаблон класс "NHandyPack::TVectorSerializerstd::wstring,wchar_t"
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.13.26128\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -I. -Ijamspell -Ic:\anaconda3\include -Ic:\anaconda3\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.13.26128\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.13.26128\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\cppwinrt" /EHsc /Tpjamspell\spell_corrector.cpp /Fobuild\temp.win-amd64-3.6\Release\jamspell\spell_corrector.obj -std=c++11 -O2
cl: командная строка warning D9002: пропуск неизвестного параметра "-std=c++11"
spell_corrector.cpp
.\contrib/handypack/handypack.hpp(134): warning C4267: инициализация: преобразование из "size_t" в "uint32_t"; возможна потеря данных
.\contrib/handypack/handypack.hpp(133): note: при компиляции функции-члена "<Нет данных>" класса класс <Нет данных>
c:\users\blago\appdata\local\temp\pip-install-kwnezrz5\jamspell\jamspell\lang_model.hpp(51): note: выполняется компиляция ссылки на экземпляр шаблон функции "void NHandyPack::TUnorderedMapSerializer<tsl::robin_map<std::wstring,NJamSpell::TWordId,std::hash,std::equal_to,std::allocator<std::pair<Key,T>>,false,tsl::rh::power_of_two_growth_policy<2>>,std::wstring,NJamSpell::TWordId>::Dump(std::ostream &,const TVec &)"
with
[
Key=std::wstring,
T=NJamSpell::TWordId,
TVec=tsl::robin_map<std::wstring,NJamSpell::TWordId,std::hashstd::wstring,std::equal_tostd::wstring,std::allocator<std::pairstd::wstring,NJamSpell::TWordId>,false,tsl::rh::power_of_two_growth_policy<2>>
]
c:\users\blago\appdata\local\temp\pip-install-kwnezrz5\jamspell\jamspell\lang_model.hpp(47): note: выполняется компиляция ссылки на экземпляр шаблон класс "NHandyPack::TUnorderedMapSerializer<tsl::robin_map<std::wstring,NJamSpell::TWordId,std::hash,std::equal_to,std::allocator<std::pair<Key,T>>,false,tsl::rh::power_of_two_growth_policy<2>>,std::wstring,NJamSpell::TWordId>"
with
[
Key=std::wstring,
T=NJamSpell::TWordId
]
c:\users\blago\appdata\local\temp\pip-install-kwnezrz5\jamspell\contrib\tsl\robin_growth_policy.h(186): note: выполняется компиляция ссылки на экземпляр шаблон класс "std::array<::size_t,39>"
.\contrib/handypack/handypack.hpp(158): warning C4267: инициализация: преобразование из "size_t" в "uint32_t"; возможна потеря данных
.\contrib/handypack/handypack.hpp(157): note: при компиляции функции-члена "<Нет данных>" класса класс <Нет данных>
.\contrib/handypack/handypack.hpp(202): note: выполняется компиляция ссылки на экземпляр шаблон функции "void NHandyPack::TSetSerializer<std::unordered_set<wchar_t,std::hash<_Kty>,std::equal_to<_Kty>,std::allocator<wchar_t>>,T>::Dump(std::ostream &,const TVec &)"
with
[
_Kty=wchar_t,
T=wchar_t,
TVec=std::unordered_set<wchar_t,std::hash<wchar_t>,std::equal_to<wchar_t>,std::allocator<wchar_t>>
]
.\contrib/handypack/handypack.hpp(184): note: выполняется компиляция ссылки на экземпляр шаблон класс "NHandyPack::TSetSerializer<std::unordered_set<wchar_t,std::hash<_Kty>,std::equal_to<_Kty>,std::allocator<wchar_t>>,T>"
with
[
_Kty=wchar_t,
T=wchar_t
]
.\contrib/handypack/handypack.hpp(202): note: выполняется компиляция ссылки на экземпляр шаблон класс "NHandyPack::TSerializer<T,void>"
with
[
T=std::unordered_set<wchar_t,std::hash<wchar_t>,std::equal_to<wchar_t>,std::allocator<wchar_t>>
]
c:\users\blago\appdata\local\temp\pip-install-kwnezrz5\jamspell\jamspell\utils.hpp(50): note: выполняется компиляция ссылки на экземпляр шаблон функции "void NHandyPack::Dump<std::unordered_set<wchar_t,std::hash<_Kty>,std::equal_to<_Kty>,std::allocator<wchar_t>>>(std::ostream &,const T &)"
with
[
_Kty=wchar_t,
T=std::unordered_set<wchar_t,std::hash<wchar_t>,std::equal_to<wchar_t>,std::allocator<wchar_t>>
]
.\contrib/handypack/handypack.hpp(87): warning C4267: инициализация: преобразование из "size_t" в "uint32_t"; возможна потеря данных
.\contrib/handypack/handypack.hpp(86): note: при компиляции функции-члена "<Нет данных>" класса класс <Нет данных>
.\contrib/handypack/handypack.hpp(202): note: выполняется компиляция ссылки на экземпляр шаблон функции "void NHandyPack::TVectorSerializerstd::wstring,wchar_t::Dump(std::ostream &,const TVec &)"
with
[
TVec=std::wstring
]
.\contrib/handypack/handypack.hpp(180): note: выполняется компиляция ссылки на экземпляр шаблон класс "NHandyPack::TVectorSerializerstd::wstring,wchar_t"
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.13.26128\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -I. -Ijamspell -Ic:\anaconda3\include -Ic:\anaconda3\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.13.26128\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.13.26128\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\cppwinrt" /EHsc /Tpjamspell\utils.cpp /Fobuild\temp.win-amd64-3.6\Release\jamspell\utils.obj -std=c++11 -O2
cl: командная строка warning D9002: пропуск неизвестного параметра "-std=c++11"
utils.cpp
.\contrib/handypack/handypack.hpp(158): warning C4267: инициализация: преобразование из "size_t" в "uint32_t"; возможна потеря данных
.\contrib/handypack/handypack.hpp(157): note: при компиляции функции-члена "<Нет данных>" класса класс <Нет данных>
.\contrib/handypack/handypack.hpp(202): note: выполняется компиляция ссылки на экземпляр шаблон функции "void NHandyPack::TSetSerializer<std::unordered_set<wchar_t,std::hash<_Kty>,std::equal_to<_Kty>,std::allocator<wchar_t>>,T>::Dump(std::ostream &,const TVec &)"
with
[
_Kty=wchar_t,
T=wchar_t,
TVec=std::unordered_set<wchar_t,std::hash<wchar_t>,std::equal_to<wchar_t>,std::allocator<wchar_t>>
]
.\contrib/handypack/handypack.hpp(184): note: выполняется компиляция ссылки на экземпляр шаблон класс "NHandyPack::TSetSerializer<std::unordered_set<wchar_t,std::hash<_Kty>,std::equal_to<_Kty>,std::allocator<wchar_t>>,T>"
with
[
_Kty=wchar_t,
T=wchar_t
]
.\contrib/handypack/handypack.hpp(202): note: выполняется компиляция ссылки на экземпляр шаблон класс "NHandyPack::TSerializer<T,void>"
with
[
T=std::unordered_set<wchar_t,std::hash<wchar_t>,std::equal_to<wchar_t>,std::allocator<wchar_t>>
]
c:\users\blago\appdata\local\temp\pip-install-kwnezrz5\jamspell\jamspell\utils.hpp(50): note: выполняется компиляция ссылки на экземпляр шаблон функции "void NHandyPack::Dump<std::unordered_set<wchar_t,std::hash<_Kty>,std::equal_to<_Kty>,std::allocator<wchar_t>>>(std::ostream &,const T &)"
with
[
_Kty=wchar_t,
T=std::unordered_set<wchar_t,std::hash<wchar_t>,std::equal_to<wchar_t>,std::allocator<wchar_t>>
]
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.13.26128\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -I. -Ijamspell -Ic:\anaconda3\include -Ic:\anaconda3\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.13.26128\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.13.26128\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\cppwinrt" /EHsc /Tpjamspell\perfect_hash.cpp /Fobuild\temp.win-amd64-3.6\Release\jamspell\perfect_hash.obj -std=c++11 -O2
cl: командная строка warning D9002: пропуск неизвестного параметра "-std=c++11"
perfect_hash.cpp
jamspell\perfect_hash.cpp(75): warning C4267: return: преобразование из "size_t" в "uint32_t"; возможна потеря данных
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.13.26128\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -I. -Ijamspell -Ic:\anaconda3\include -Ic:\anaconda3\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.13.26128\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.13.26128\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\cppwinrt" /EHsc /Tpjamspell\bloom_filter.cpp /Fobuild\temp.win-amd64-3.6\Release\jamspell\bloom_filter.obj -std=c++11 -O2
cl: командная строка warning D9002: пропуск неизвестного параметра "-std=c++11"
bloom_filter.cpp
.\contrib/handypack/handypack.hpp(87): warning C4267: инициализация: преобразование из "size_t" в "uint32_t"; возможна потеря данных
.\contrib/handypack/handypack.hpp(86): note: при компиляции функции-члена "<Нет данных>" класса класс <Нет данных>
.\contrib/handypack/handypack.hpp(202): note: выполняется компиляция ссылки на экземпляр шаблон функции "void NHandyPack::TVectorSerializer<std::vector<bloom_filter::bloom_type,std::allocator<_Ty>>,T>::Dump(std::ostream &,const TVec &)"
with
[
_Ty=bloom_filter::bloom_type,
T=bloom_filter::bloom_type,
TVec=std::vector<bloom_filter::bloom_type,std::allocator<bloom_filter::bloom_type>>
]
.\contrib/handypack/handypack.hpp(177): note: выполняется компиляция ссылки на экземпляр шаблон класс "NHandyPack::TVectorSerializer<std::vector<bloom_filter::bloom_type,std::allocator<_Ty>>,T>"
with
[
_Ty=bloom_filter::bloom_type,
T=bloom_filter::bloom_type
]
.\contrib/handypack/handypack.hpp(202): note: выполняется компиляция ссылки на экземпляр шаблон класс "NHandyPack::TSerializer<T,void>"
with
[
T=std::vector<bloom_filter::bloom_type,std::allocator<bloom_filter::bloom_type>>
]
.\contrib/handypack/handypack.hpp(207): note: выполняется компиляция ссылки на экземпляр шаблон функции "void NHandyPack::Dump(std::ostream &,const T &)"
with
[
T=std::vector<bloom_filter::bloom_type,std::allocator<bloom_filter::bloom_type>>
]
jamspell\bloom_filter.cpp(18): note: выполняется компиляция ссылки на экземпляр шаблон функции "void NHandyPack::Dump<std::vector<bloom_filter::bloom_type,std::allocator<_Ty>>,std::vector<unsigned char,std::allocator>,unsigned int,unsigned __int64,unsigned __int64,unsigned __int64,unsigned __int64,double>(std::ostream &,const T &,const std::vector<unsigned char,std::allocator> &,const unsigned int &,const unsigned __int64 &,const unsigned __int64 &,const unsigned __int64 &,const unsigned __int64 &,const double &)"
with
[
_Ty=bloom_filter::bloom_type,
T=std::vector<bloom_filter::bloom_type,std::allocator<bloom_filter::bloom_type>>
]
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.13.26128\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -I. -Ijamspell -Ic:\anaconda3\include -Ic:\anaconda3\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.13.26128\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.13.26128\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\cppwinrt" /EHsc /Tpcontrib\cityhash\city.cc /Fobuild\temp.win-amd64-3.6\Release\contrib\cityhash\city.obj -std=c++11 -O2
cl: командная строка warning D9002: пропуск неизвестного параметра "-std=c++11"
city.cc
contrib\cityhash\city.cc(165): warning C4267: инициализация: преобразование из "size_t" в "uint32"; возможна потеря данных
contrib\cityhash\city.cc(178): warning C4267: аргумент: преобразование из "size_t" в "uint32"; возможна потеря данных
contrib\cityhash\city.cc(182): warning C4267: инициализация: преобразование из "size_t" в "uint32"; возможна потеря данных
contrib\cityhash\city.cc(197): warning C4267: инициализация: преобразование из "size_t" в "uint32"; возможна потеря данных
contrib\cityhash\city.cc(302): warning C4267: инициализация: преобразование из "size_t" в "uint32"; возможна потеря данных
contrib\cityhash\city.cc(420): warning C4267: инициализация: преобразование из "size_t" в "long"; возможна потеря данных
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.13.26128\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -I. -Ijamspell -Ic:\anaconda3\include -Ic:\anaconda3\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.13.26128\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.13.26128\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\cppwinrt" /EHsc /Tpcontrib\phf\phf.cc /Fobuild\temp.win-amd64-3.6\Release\contrib\phf\phf.obj -std=c++11 -O2
cl: командная строка warning D9002: пропуск неизвестного параметра "-std=c++11"
phf.cc
contrib\phf\phf.cc(414): warning C4244: аргумент: преобразование "uint64_t" в "uint32_t", возможна потеря данных
contrib\phf\phf.cc(578): warning C4267: аргумент: преобразование из "size_t" в "uint32_t"; возможна потеря данных
contrib\phf\phf.cc(682): note: выполняется компиляция ссылки на экземпляр шаблон функции "int PHF::init<uint32_t,true>(phf *,const uint32_t [],const ::size_t,const ::size_t,const ::size_t,const phf_seed_t)"
contrib\phf\phf.cc(583): warning C4267: аргумент: преобразование из "size_t" в "uint32_t"; возможна потеря данных
contrib\phf\phf.cc(595): warning C4267: аргумент: преобразование из "size_t" в "uint32_t"; возможна потеря данных
contrib\phf\phf.cc(600): warning C4267: =: преобразование из "size_t" в "uint32_t"; возможна потеря данных
contrib\phf\phf.cc(601): warning C4267: =: преобразование из "size_t" в "uint32_t"; возможна потеря данных
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.13.26128\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -I. -Ijamspell -Ic:\anaconda3\include -Ic:\anaconda3\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.13.26128\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.13.26128\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\cppwinrt" /EHsc /Tpjamspell_wrap.cpp /Fobuild\temp.win-amd64-3.6\Release\jamspell_wrap.obj -std=c++11 -O2
cl: командная строка warning D9002: пропуск неизвестного параметра "-std=c++11"
jamspell_wrap.cpp
.\contrib/handypack/handypack.hpp(134): warning C4267: инициализация: преобразование из "size_t" в "uint32_t"; возможна потеря данных
.\contrib/handypack/handypack.hpp(133): note: при компиляции функции-члена "<Нет данных>" класса класс <Нет данных>
c:\users\blago\appdata\local\temp\pip-install-kwnezrz5\jamspell\jamspell\lang_model.hpp(51): note: выполняется компиляция ссылки на экземпляр шаблон функции "void NHandyPack::TUnorderedMapSerializer<tsl::robin_map<std::wstring,NJamSpell::TWordId,std::hash,std::equal_to,std::allocator<std::pair<Key,T>>,false,tsl::rh::power_of_two_growth_policy<2>>,std::wstring,NJamSpell::TWordId>::Dump(std::ostream &,const TVec &)"
with
[
Key=std::wstring,
T=NJamSpell::TWordId,
TVec=tsl::robin_map<std::wstring,NJamSpell::TWordId,std::hashstd::wstring,std::equal_tostd::wstring,std::allocator<std::pairstd::wstring,NJamSpell::TWordId>,false,tsl::rh::power_of_two_growth_policy<2>>
]
c:\users\blago\appdata\local\temp\pip-install-kwnezrz5\jamspell\jamspell\lang_model.hpp(47): note: выполняется компиляция ссылки на экземпляр шаблон класс "NHandyPack::TUnorderedMapSerializer<tsl::robin_map<std::wstring,NJamSpell::TWordId,std::hash,std::equal_to,std::allocator<std::pair<Key,T>>,false,tsl::rh::power_of_two_growth_policy<2>>,std::wstring,NJamSpell::TWordId>"
with
[
Key=std::wstring,
T=NJamSpell::TWordId
]
c:\users\blago\appdata\local\temp\pip-install-kwnezrz5\jamspell\contrib\tsl\robin_growth_policy.h(186): note: выполняется компиляция ссылки на экземпляр шаблон класс "std::array<::size_t,39>"
.\contrib/handypack/handypack.hpp(158): warning C4267: инициализация: преобразование из "size_t" в "uint32_t"; возможна потеря данных
.\contrib/handypack/handypack.hpp(157): note: при компиляции функции-члена "<Нет данных>" класса класс <Нет данных>
.\contrib/handypack/handypack.hpp(202): note: выполняется компиляция ссылки на экземпляр шаблон функции "void NHandyPack::TSetSerializer<std::unordered_set<wchar_t,std::hash<_Kty>,std::equal_to<_Kty>,std::allocator<wchar_t>>,T>::Dump(std::ostream &,const TVec &)"
with
[
_Kty=wchar_t,
T=wchar_t,
TVec=std::unordered_set<wchar_t,std::hash<wchar_t>,std::equal_to<wchar_t>,std::allocator<wchar_t>>
]
.\contrib/handypack/handypack.hpp(184): note: выполняется компиляция ссылки на экземпляр шаблон класс "NHandyPack::TSetSerializer<std::unordered_set<wchar_t,std::hash<_Kty>,std::equal_to<_Kty>,std::allocator<wchar_t>>,T>"
with
[
_Kty=wchar_t,
T=wchar_t
]
.\contrib/handypack/handypack.hpp(202): note: выполняется компиляция ссылки на экземпляр шаблон класс "NHandyPack::TSerializer<T,void>"
with
[
T=std::unordered_set<wchar_t,std::hash<wchar_t>,std::equal_to<wchar_t>,std::allocator<wchar_t>>
]
c:\users\blago\appdata\local\temp\pip-install-kwnezrz5\jamspell\jamspell\utils.hpp(50): note: выполняется компиляция ссылки на экземпляр шаблон функции "void NHandyPack::Dump<std::unordered_set<wchar_t,std::hash<_Kty>,std::equal_to<_Kty>,std::allocator<wchar_t>>>(std::ostream &,const T &)"
with
[
_Kty=wchar_t,
T=std::unordered_set<wchar_t,std::hash<wchar_t>,std::equal_to<wchar_t>,std::allocator<wchar_t>>
]
.\contrib/handypack/handypack.hpp(87): warning C4267: инициализация: преобразование из "size_t" в "uint32_t"; возможна потеря данных
.\contrib/handypack/handypack.hpp(86): note: при компиляции функции-члена "<Нет данных>" класса класс <Нет данных>
.\contrib/handypack/handypack.hpp(202): note: выполняется компиляция ссылки на экземпляр шаблон функции "void NHandyPack::TVectorSerializerstd::wstring,wchar_t::Dump(std::ostream &,const TVec &)"
with
[
TVec=std::wstring
]
.\contrib/handypack/handypack.hpp(180): note: выполняется компиляция ссылки на экземпляр шаблон класс "NHandyPack::TVectorSerializerstd::wstring,wchar_t"
creating C:\Users\blago\AppData\Local\Temp\pip-install-kwnezrz5\jamspell\build\lib.win-amd64-3.6
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.13.26128\bin\HostX86\x64\link.exe /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:c:\anaconda3\libs /LIBPATH:c:\anaconda3\PCbuild\amd64 "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.13.26128\ATLMFC\lib\x64" "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.13.26128\lib\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.16299.0\ucrt\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.16299.0\um\x64" /EXPORT:PyInit__jamspell build\temp.win-amd64-3.6\Release\jamspell\lang_model.obj build\temp.win-amd64-3.6\Release\jamspell\spell_corrector.obj build\temp.win-amd64-3.6\Release\jamspell\utils.obj build\temp.win-amd64-3.6\Release\jamspell\perfect_hash.obj build\temp.win-amd64-3.6\Release\jamspell\bloom_filter.obj build\temp.win-amd64-3.6\Release\contrib\cityhash\city.obj build\temp.win-amd64-3.6\Release\contrib\phf\phf.obj build\temp.win-amd64-3.6\Release\jamspell_wrap.obj /OUT:build\lib.win-amd64-3.6_jamspell.cp36-win_amd64.pyd /IMPLIB:build\temp.win-amd64-3.6\Release\jamspell_jamspell.cp36-win_amd64.lib
Создается библиотека build\temp.win-amd64-3.6\Release\jamspell_jamspell.cp36-win_amd64.lib и объект build\temp.win-amd64-3.6\Release\jamspell_jamspell.cp36-win_amd64.exp
Создание кода
Создание кода завершено
running build_py
copying jamspell.py -> build\lib.win-amd64-3.6
running egg_info
writing jamspell.egg-info\PKG-INFO
writing dependency_links to jamspell.egg-info\dependency_links.txt
writing top-level names to jamspell.egg-info\top_level.txt
reading manifest file 'jamspell.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'jamspell.egg-info\SOURCES.txt'
installing to build\bdist.win-amd64\wheel
running install
Checking .pth file support in build\bdist.win-amd64\wheel.
c:\anaconda3\pythonw.exe -E -c pass
TEST FAILED: build\bdist.win-amd64\wheel.\ does NOT support .pth files
error: bad install directory or PYTHONPATH

You are attempting to install a package to a directory that is not
on PYTHONPATH and which Python does not read ".pth" files from. The
installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:

  build\bdist.win-amd64\wheel\.\

and your PYTHONPATH environment variable currently contains:

  'C:\\Anaconda3'

Here are some of your options for correcting the problem:

  • You can choose a different installation directory, i.e., one that is
    on PYTHONPATH or supports .pth files

  • You can add the installation directory to the PYTHONPATH environment
    variable. (It must then also be on PYTHONPATH whenever you run
    Python and want to use the package(s) you are installing.)

  • You can set up the installation directory to support ".pth" files by
    using one of the approaches described here:

    https://setuptools.readthedocs.io/en/latest/easy_install.html#custom-installation-locations

Please make the appropriate changes for your system and try again.


Failed building wheel for jamspell

Dockerizing JamSpell

Hello! I am trying to put a JamSpell into a docker but I have faced the following problem.
My Dockerfile is

FROM python:3.6.5-stretch
RUN apt-get update && \
    apt-get -y install swig3.0
RUN pip3 install jamspell

And during the installation, I can see the next log

writing manifest file 'jamspell.egg-info/SOURCES.txt'
  installing to build/bdist.linux-x86_64/wheel
  running install
  Checking .pth file support in build/bdist.linux-x86_64/wheel/
  /usr/local/bin/python -E -c pass
  TEST FAILED: build/bdist.linux-x86_64/wheel/ does NOT support .pth files
  error: bad install directory or PYTHONPATH
  
  You are attempting to install a package to a directory that is not
  on PYTHONPATH and which Python does not read ".pth" files from.  The
  installation directory you specified (via --install-dir, --prefix, or
  the distutils default setting) was:
  
      build/bdist.linux-x86_64/wheel/
  
  and your PYTHONPATH environment variable currently contains:
  
      ''
  
  Here are some of your options for correcting the problem:
  
  * You can choose a different installation directory, i.e., one that is
    on PYTHONPATH or supports .pth files
  
  * You can add the installation directory to the PYTHONPATH environment
    variable.  (It must then also be on PYTHONPATH whenever you run
    Python and want to use the package(s) you are installing.)
  
  * You can set up the installation directory to support ".pth" files by
    using one of the approaches described here:
  
    https://setuptools.readthedocs.io/en/latest/easy_install.html#custom-installation-locations
  
  
  Please make the appropriate changes for your system and try again.
  
  ----------------------------------------
  Failed building wheel for jamspell
  Running setup.py clean for jamspell
Failed to build jamspell
Installing collected packages: jamspell
  Running setup.py install for jamspell: started
    Running setup.py install for jamspell: finished with status 'done'
  Could not find .egg-info directory in install record for jamspell from https://files.pythonhosted.org/packages/30/20/37b376f21547222b5eb1ee08cc99b42dfa84d31166bb99ae195d43372034/jamspell-0.0.10.tar.gz#sha256=204f20c96a0c69a61c091283630409ef1664403a0475934db0432a66681978ce
Successfully installed jamspell

Do you know what can be the reason of such an error?

installing jamspell error

Exception:
Traceback (most recent call last):
File "c:\users\vshala\appdata\local\programs\python\python36\lib\site-packages\pip\compat_init_.py", line 73, in console_to_str
return s.decode(sys.stdout.encoding)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x94 in position 118: invalid start byte

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "c:\users\vshala\appdata\local\programs\python\python36\lib\site-packages\pip\commands\install.py", line 342, in run
prefix=options.prefix_path,
File "c:\users\vshala\appdata\local\programs\python\python36\lib\site-packages\pip\req\req_set.py", line 784, in install
**kwargs
File "c:\users\vshala\appdata\local\programs\python\python36\lib\site-packages\pip\req\req_install.py", line 878, in install
spinner=spinner,
File "c:\users\vshala\appdata\local\programs\python\python36\lib\site-packages\pip\utils_init_.py", line 676, in call_subprocess
line = console_to_str(proc.stdout.readline())
File "c:\users\vshala\appdata\local\programs\python\python36\lib\site-packages\pip\compat_init_.py", line 75, in console_to_str
return s.decode('utf_8')
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x94 in position 118: invalid start byte

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "c:\users\vshala\appdata\local\programs\python\python36\lib\site-packages\pip\commands\install.py", line 385, in run
requirement_set.cleanup_files()
File "c:\users\vshala\appdata\local\programs\python\python36\lib\site-packages\pip\req\req_set.py", line 729, in cleanup_files
req.remove_temporary_source()
File "c:\users\vshala\appdata\local\programs\python\python36\lib\site-packages\pip\req\req_install.py", line 977, in remove_temporary_source
rmtree(self.source_dir)
File "c:\users\vshala\appdata\local\programs\python\python36\lib\site-packages\pip_vendor\retrying.py", line 49, in wrapped_f
return Retrying(*dargs, **dkw).call(f, *args, **kw)
File "c:\users\vshala\appdata\local\programs\python\python36\lib\site-packages\pip_vendor\retrying.py", line 212, in call
raise attempt.get()
File "c:\users\vshala\appdata\local\programs\python\python36\lib\site-packages\pip_vendor\retrying.py", line 247, in get
six.reraise(self.value[0], self.value[1], self.value[2])
File "c:\users\vshala\appdata\local\programs\python\python36\lib\site-packages\pip_vendor\six.py", line 686, in reraise
raise value
File "c:\users\vshala\appdata\local\programs\python\python36\lib\site-packages\pip_vendor\retrying.py", line 200, in call
attempt = Attempt(fn(*args, **kwargs), attempt_number, False)
File "c:\users\vshala\appdata\local\programs\python\python36\lib\site-packages\pip\utils_init_.py", line 102, in rmtree
onerror=rmtree_errorhandler)
File "c:\users\vshala\appdata\local\programs\python\python36\lib\shutil.py", line 494, in rmtree
return _rmtree_unsafe(path, onerror)
File "c:\users\vshala\appdata\local\programs\python\python36\lib\shutil.py", line 384, in _rmtree_unsafe
_rmtree_unsafe(fullname, onerror)
File "c:\users\vshala\appdata\local\programs\python\python36\lib\shutil.py", line 384, in _rmtree_unsafe
_rmtree_unsafe(fullname, onerror)
File "c:\users\vshala\appdata\local\programs\python\python36\lib\shutil.py", line 376, in rmtree_unsafe
onerror(os.listdir, path, sys.exc_info())
File "c:\users\vshala\appdata\local\programs\python\python36\lib\site-packages\pip\utils_init
.py", line 112, in rmtree_errorhandler
os.chmod(path, stat.S_IWRITE)
PermissionError: [WinError 5] Zugriff verweigert: 'C:\Users\VShala\AppData\Local\Temp\pip-build-r5j3cnpy\jamspell\contrib\cityhash'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "c:\users\vshala\appdata\local\programs\python\python36\lib\site-packages\pip\basecommand.py", line 215, in main
status = self.run(options, args)
File "c:\users\vshala\appdata\local\programs\python\python36\lib\site-packages\pip\commands\install.py", line 385, in run
requirement_set.cleanup_files()
File "c:\users\vshala\appdata\local\programs\python\python36\lib\site-packages\pip\utils\build.py", line 38, in exit
self.cleanup()
File "c:\users\vshala\appdata\local\programs\python\python36\lib\site-packages\pip\utils\build.py", line 42, in cleanup
rmtree(self.name)
File "c:\users\vshala\appdata\local\programs\python\python36\lib\site-packages\pip_vendor\retrying.py", line 49, in wrapped_f
return Retrying(*dargs, **dkw).call(f, *args, **kw)
File "c:\users\vshala\appdata\local\programs\python\python36\lib\site-packages\pip_vendor\retrying.py", line 212, in call
raise attempt.get()
File "c:\users\vshala\appdata\local\programs\python\python36\lib\site-packages\pip_vendor\retrying.py", line 247, in get
six.reraise(self.value[0], self.value[1], self.value[2])
File "c:\users\vshala\appdata\local\programs\python\python36\lib\site-packages\pip_vendor\six.py", line 686, in reraise
raise value
File "c:\users\vshala\appdata\local\programs\python\python36\lib\site-packages\pip_vendor\retrying.py", line 200, in call
attempt = Attempt(fn(*args, **kwargs), attempt_number, False)
File "c:\users\vshala\appdata\local\programs\python\python36\lib\site-packages\pip\utils_init_.py", line 102, in rmtree
onerror=rmtree_errorhandler)
File "c:\users\vshala\appdata\local\programs\python\python36\lib\shutil.py", line 494, in rmtree
return _rmtree_unsafe(path, onerror)
File "c:\users\vshala\appdata\local\programs\python\python36\lib\shutil.py", line 384, in _rmtree_unsafe
_rmtree_unsafe(fullname, onerror)
File "c:\users\vshala\appdata\local\programs\python\python36\lib\shutil.py", line 384, in _rmtree_unsafe
_rmtree_unsafe(fullname, onerror)
File "c:\users\vshala\appdata\local\programs\python\python36\lib\shutil.py", line 384, in _rmtree_unsafe
_rmtree_unsafe(fullname, onerror)
File "c:\users\vshala\appdata\local\programs\python\python36\lib\shutil.py", line 376, in rmtree_unsafe
onerror(os.listdir, path, sys.exc_info())
File "c:\users\vshala\appdata\local\programs\python\python36\lib\site-packages\pip\utils_init
.py", line 112, in rmtree_errorhandler
os.chmod(path, stat.S_IWRITE)
PermissionError: [WinError 5] Zugriff verweigert: 'C:\Users\VShala\AppData\Local\Temp\pip-build-r5j3cnpy\jamspell\contrib\cityhash'

New russian language model

Здравствуйте, я тут обучил JamSpell на наборе данных из русских субтитров (примерно 5 млн предложений) к 347 различным сериалам, взятыми из корпуса Taiga. После очистки данных получился текстовый файл с субтитрами размером 310Mb.

Результаты оценки модели:
result_evaluate

Скачать можно из моего Google Drive: jamspell_ru_model_subtitles.bin.zip (58Mb)

PS. Буду только рад, если добавите эту модель к списку готовых моделей в README проекта :)

How does JamSpell correction work?

it consider words surroundings (context) for better correction

If Hunspell suggests a list of words with minimal REPlacement position but for uni-gram, then does JamSpell consider some N-gram with Markov chain etc :) ?

>>> jamspell_corrector.FixFragment('how sre you')
u'how are you'
>>> hunspell_corrector.suggest('sre')
[u'tire', u'are', u'see', u're', u'sere', u'sire', u'sore', u'sure', u'res', u'ere', u'ire', u'ore', u'sue', u'she', u'Ore']
>>> jamspell_corrector.FixFragment('how you sre')
u'how you are'
>>> jamspell_corrector.FixFragment('you sre how')
u'you see how'

How much memory do I need to train a model?

I tried to train on whole Russian wikipedia dump (~1.3 mln articles). The program crashed after couple of minutes:

./main/jamspell train alphabet_ru.txt wiki_ru.txt model_wiki.bin
[info] loading text
terminate called after throwing an instance of 'std:bad_alloc'
...
Aborted (core dump)

Ubuntu 16.04 with 32GB memory. Will 64GB be enough to train?

Differentiate unknown words in spell checker output

Is there a way to differentiate between words that are unknown to the dictionary? For example, in the sentence below "table" is a correctly spelled word; "xyz" is a completely unknown word; "clth" is a misspelled word (I get candidates for this - all good). The issue I'm currently facing is there is no way to know what words are correctly spelled vs unknown.
$ curl "http://localhost:8081/candidates?text=table xyz clth" { "results": [ { "candidates": [ "cloth", "cath", "clth", "clt1" ], "len": 4, "pos_from": 10 } ] }

Any thoughts?

Debian 8 Jessy installation problem

Here's the Dockerfile that is failing to install Jamspell:

FROM python:3.6

RUN apt-get update
RUN apt-get install -y build-essential \
                       swig3.0

RUN pip install jamspell

Here's the output of the docker build:

  Failed building wheel for jamspell
  Running setup.py bdist_wheel for jamspell: finished with status 'error'
  Complete output from command /usr/local/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-3lt6gsjy/jamspell/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/pip-wheel-yfx7dl46 --python-tag cp36:
  running bdist_wheel
  running build
  running build_ext
  building '_jamspell' extension
  swigging jamspell.i to jamspell_wrap.cpp
  /usr/bin/swig3.0 -python -c++ -o jamspell_wrap.cpp jamspell.i
  creating build
  creating build/temp.linux-x86_64-3.6
  creating build/temp.linux-x86_64-3.6/jamspell
  creating build/temp.linux-x86_64-3.6/contrib
  creating build/temp.linux-x86_64-3.6/contrib/cityhash
  creating build/temp.linux-x86_64-3.6/contrib/phf
  gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I. -Ijamspell -I/usr/local/include/python3.6m -c jamspell/lang_model.cpp -o build/temp.linux-x86_64-3.6/jamspell/lang_model.o -std=c++11 -O2
  cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
  gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I. -Ijamspell -I/usr/local/include/python3.6m -c jamspell/spell_corrector.cpp -o build/temp.linux-x86_64-3.6/jamspell/spell_corrector.o -std=c++11 -O2
  cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
  gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I. -Ijamspell -I/usr/local/include/python3.6m -c jamspell/utils.cpp -o build/temp.linux-x86_64-3.6/jamspell/utils.o -std=c++11 -O2
  cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
  jamspell/utils.cpp:12:23: fatal error: codecvt: No such file or directory
       #include <codecvt>
                         ^
  compilation terminated.
  error: command 'gcc' failed with exit status 1
  
  ----------------------------------------

Any thoughts on making it work? I know it compiles on Ubuntu 16:04, but that image is heavier and doesn't have Python 3.6 pre-installed.

HTTP API: seems both methods "fix" and "candidate" don't return expected results with russian words

I trained a model with default kapitanskaya_dochka.txt (also tried with Anna Karenina and collection of 160 000+ russian words) and russian alphabet file. I started HTTP server with these models and used both GET and POST methods via console (in UTF-8: curl -d "ствкан" http://localhost:8080/candidates or curl -d "синтябрь" http://localhost:8080/fix) and via PHP test script (also in UTF-8).
The server responded but with empty candidates array.

UPD: Also tried downloaded model (ru_small.bin) with the same result. After all tried English one - the same result. So, it looks like the server is working and responding, but always failed with answer.

Ubuntu 16.04

std::bad_alloc on jamspell train

I downloaded latest Wikipedia dump, extracted plain text from it and got 12 GiB text file. I ran a training and got an error:

terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc

I've checked the memory and verified, that I have it enough.

Error in handypack.hpp while installing Jamspell

Hi, Im trying to install Jamspell on Windows 10, Python 2.7. I am getting syntax errors from one the source files that is within jamspell - handypack.hpp. See the full stack trace below.

Collecting jamspell
Using cached https://files.pythonhosted.org/packages/5a/16/0a808e926a835604007066085cb2183b337694a06240a99945b31fa14f27/jamspell-0.0.11.tar.gz
Building wheels for collected packages: jamspell
Running setup.py bdist_wheel for jamspell ... error
Complete output from command C:\ProgramData\Anaconda2\python.exe -u -c "import setuptools, tokenize;file='c:\users\sasheth\appdata\local\temp\pip-build-1pszkn\jamspell\setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" bdist_wheel -d c:\users\sasheth\appdata\local\temp\tmpwm3e0ypip-wheel- --python-tag cp27:
running bdist_wheel
running build
running build_ext
building 'jamspell' extension
swigging jamspell.i to jamspell_wrap.cpp
C:\swigwin-3.0.12\swig.exe -python -c++ -o jamspell_wrap.cpp jamspell.i
creating build
creating build\temp.win32-2.7
creating build\temp.win32-2.7\Release
creating build\temp.win32-2.7\Release\jamspell
creating build\temp.win32-2.7\Release\contrib
creating build\temp.win32-2.7\Release\contrib\cityhash
creating build\temp.win32-2.7\Release\contrib\phf
C:\Users\sasheth\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -I. -Ijamspell -IC:\ProgramData\Anaconda2\include -IC:\ProgramData\Anaconda2\PC /Tpjamspell\lang_model.cpp /Fobuild\temp.win32-2.7\Release\jamspell\lang_model.obj -std=c++11 -O2
cl : Command line warning D9002 : ignoring unknown option '-std=c++11'
lang_model.cpp
C:\Users\sasheth\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Include\xlocale(342) : warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc
.\contrib/handypack/handypack.hpp(72) : error C2332: 'class' : missing tag name
.\contrib/handypack/handypack.hpp(72) : error C2993: '' : illegal type for non-type template parameter ''
.\contrib/handypack/handypack.hpp(72) : error C2143: syntax error : missing ',' before '...'
.\contrib/handypack/handypack.hpp(73) : error C2039: 'tuple' : is not a member of 'std'
.\contrib/handypack/handypack.hpp(73) : error C2065: 'tuple' : undeclared identifier
.\contrib/handypack/handypack.hpp(73) : error C2065: 'Args' : undeclared identifier
.\contrib/handypack/handypack.hpp(73) : error C2143: syntax error : missing ',' before '...'
.\contrib/handypack/handypack.hpp(73) : error C2143: syntax error : missing ';' before '{'
.\contrib/handypack/handypack.hpp(75) : error C2039: 'tuple' : is not a member of 'std'
.\contrib/handypack/handypack.hpp(75) : error C2143: syntax error : missing ';' before '{'
.\contrib/handypack/handypack.hpp(76) : error C2065: 'object' : undeclared identifier
.\contrib/handypack/handypack.hpp(76) : error C2059: syntax error : '...'
.\contrib/handypack/handypack.hpp(76) : error C2059: syntax error : ')'
.\contrib/handypack/handypack.hpp(77) : error C2143: syntax error : missing ';' before '}'
.\contrib/handypack/handypack.hpp(78) : error C2039: 'tuple' : is not a member of 'std'
.\contrib/handypack/handypack.hpp(78) : error C2065: 'tuple' : undeclared identifier
.\contrib/handypack/handypack.hpp(78) : error C2065: 'Args' : undeclared identifier
.\contrib/handypack/handypack.hpp(78) : error C2143: syntax error : missing ',' before '...'
.\contrib/handypack/handypack.hpp(78) : error C2143: syntax error : missing ';' before '{'
.\contrib/handypack/handypack.hpp(79) : error C2065: 'object' : undeclared identifier
.\contrib/handypack/handypack.hpp(79) : error C2059: syntax error : '...'
.\contrib/handypack/handypack.hpp(79) : error C2059: syntax error : ')'
.\contrib/handypack/handypack.hpp(80) : error C2143: syntax error : missing ';' before '}'
.\contrib/handypack/handypack.hpp(81) : error C2143: syntax error : missing ';' before '}'
.\contrib/handypack/handypack.hpp(83) : error C2947: expecting '>' to terminate template-argument-list, found '>'
.\contrib/handypack/handypack.hpp(83) : error C2975: 'NHandyPack::int
' : invalid template argument for 'unnamed-parameter', expected compile-time constant expression
.\contrib/handypack/handypack.hpp(48) : see declaration of 'NHandyPack::int_'
.\contrib/handypack/handypack.hpp(84) : error C2236: unexpected 'class' 'TVectorSerializer'. Did you forget a ';'?
.\contrib/handypack/handypack.hpp(84) : error C2143: syntax error : missing ')' before '{'
.\contrib/handypack/handypack.hpp(84) : error C2143: syntax error : missing ',' before ')'
.\contrib/handypack/handypack.hpp(84) : error C2143: syntax error : missing ';' before '{'
.\contrib/handypack/handypack.hpp(86) : error C2143: syntax error : missing ';' before '{'
.\contrib/handypack/handypack.hpp(88) : error C2065: 'size' : undeclared identifier
.\contrib/handypack/handypack.hpp(88) : error C2070: ''unknown-type'': illegal sizeof operand
.\contrib/handypack/handypack.hpp(88) : error C2143: syntax error : missing ',' before ')'
.\contrib/handypack/handypack.hpp(89) : error C2143: syntax error : missing ';' before '{'
.\contrib/handypack/handypack.hpp(90) : error C2065: 'obj' : undeclared identifier
.\contrib/handypack/handypack.hpp(91) : error C2143: syntax error : missing ';' before '}'
.\contrib/handypack/handypack.hpp(92) : error C2143: syntax error : missing ';' before '}'
.\contrib/handypack/handypack.hpp(94) : error C2065: 'TVec' : undeclared identifier
.\contrib/handypack/handypack.hpp(94) : error C2065: 'object' : undeclared identifier
.\contrib/handypack/handypack.hpp(94) : error C2143: syntax error : missing ',' before ')'
.\contrib/handypack/handypack.hpp(94) : error C2143: syntax error : missing ';' before '{'
.\contrib/handypack/handypack.hpp(96) : error C2065: 'size' : undeclared identifier
.\contrib/handypack/handypack.hpp(96) : error C2070: ''unknown-type'': illegal sizeof operand
.\contrib/handypack/handypack.hpp(96) : error C2143: syntax error : missing ',' before ')'
.\contrib/handypack/handypack.hpp(99) : error C2143: syntax error : missing ')' before ';'
.\contrib/handypack/handypack.hpp(99) : error C2059: syntax error : ')'
.\contrib/handypack/handypack.hpp(99) : error C2143: syntax error : missing ';' before '{'
.\contrib/handypack/handypack.hpp(101) : error C2065: 'obj' : undeclared identifier
.\contrib/handypack/handypack.hpp(102) : error C2039: 'move' : is not a member of 'std'
.\contrib/handypack/handypack.hpp(103) : error C2143: syntax error : missing ';' before '}'
.\contrib/handypack/handypack.hpp(104) : error C2143: syntax error : missing ';' before '}'
.\contrib/handypack/handypack.hpp(105) : error C2143: syntax error : missing ';' before '}'
.\contrib/handypack/handypack.hpp(107) : error C2947: expecting '>' to terminate template-argument-list, found '>'
.\contrib/handypack/handypack.hpp(107) : error C2977: 'NHandyPack::int_' : too many template arguments
.\contrib/handypack/handypack.hpp(48) : see declaration of 'NHandyPack::int_'
.\contrib/handypack/handypack.hpp(108) : error C2236: unexpected 'class' 'TMapSerializer'. Did you forget a ';'?
.\contrib/handypack/handypack.hpp(108) : error C2143: syntax error : missing ')' before '{'
.\contrib/handypack/handypack.hpp(108) : error C2143: syntax error : missing ',' before ')'
.\contrib/handypack/handypack.hpp(108) : error C2143: syntax error : missing ';' before '{'
.\contrib/handypack/handypack.hpp(110) : error C2143: syntax error : missing ';' before '{'
.\contrib/handypack/handypack.hpp(112) : error C2065: 'size' : undeclared identifier
.\contrib/handypack/handypack.hpp(112) : error C2070: ''unknown-type'': illegal sizeof operand
.\contrib/handypack/handypack.hpp(112) : error C2143: syntax error : missing ',' before ')'
.\contrib/handypack/handypack.hpp(113) : error C2143: syntax error : missing ';' before '{'
.\contrib/handypack/handypack.hpp(114) : error C2065: 'obj' : undeclared identifier
.\contrib/handypack/handypack.hpp(115) : error C2143: syntax error : missing ';' before '}'
.\contrib/handypack/handypack.hpp(116) : error C2143: syntax error : missing ';' before '}'
.\contrib/handypack/handypack.hpp(118) : error C2065: 'TVec' : undeclared identifier
.\contrib/handypack/handypack.hpp(118) : error C2065: 'object' : undeclared identifier
.\contrib/handypack/handypack.hpp(118) : error C2143: syntax error : missing ',' before ')'
.\contrib/handypack/handypack.hpp(118) : error C2143: syntax error : missing ';' before '{'
.\contrib/handypack/handypack.hpp(120) : error C2065: 'size' : undeclared identifier
.\contrib/handypack/handypack.hpp(120) : error C2070: ''unknown-type'': illegal sizeof operand
.\contrib/handypack/handypack.hpp(120) : error C2143: syntax error : missing ',' before ')'
.\contrib/handypack/handypack.hpp(122) : error C2143: syntax error : missing ')' before ';'
.\contrib/handypack/handypack.hpp(122) : error C2059: syntax error : ')'
.\contrib/handypack/handypack.hpp(122) : error C2143: syntax error : missing ';' before '{'
.\contrib/handypack/handypack.hpp(124) : error C2065: 'obj' : undeclared identifier
.\contrib/handypack/handypack.hpp(125) : error C2039: 'move' : is not a member of 'std'
.\contrib/handypack/handypack.hpp(126) : error C2143: syntax error : missing ';' before '}'
.\contrib/handypack/handypack.hpp(127) : error C2143: syntax error : missing ';' before '}'
.\contrib/handypack/handypack.hpp(128) : error C2143: syntax error : missing ';' before '}'
.\contrib/handypack/handypack.hpp(130) : error C2947: expecting '>' to terminate template-argument-list, found '>'
.\contrib/handypack/handypack.hpp(152) : error C2236: unexpected 'class' 'NHandyPack::TUnorderedMapSerializer'. Did you forget a ';'?
.\contrib/handypack/handypack.hpp(152) : error C3381: 'NHandyPack::TUnorderedMapSerializer' : assembly access specifiers are only available in code compiled with a /clr option
.\contrib/handypack/handypack.hpp(177) : error C2504: 'TVectorSerializer' : base class undefined
.\contrib/handypack/handypack.hpp(177) : see reference to class template instantiation 'NHandyPack::TSerializer<std::vector>' being compiled
.\contrib/handypack/handypack.hpp(177) : error C2143: syntax error : missing ',' before '<'
.\contrib/handypack/handypack.hpp(178) : error C2504: 'TVectorSerializer' : base class undefined
.\contrib/handypack/handypack.hpp(178) : see reference to class template instantiation 'NHandyPack::TSerializer<std::list>' being compiled
.\contrib/handypack/handypack.hpp(178) : error C2143: syntax error : missing ',' before '<'
.\contrib/handypack/handypack.hpp(179) : error C2504: 'TVectorSerializer' : base class undefined
.\contrib/handypack/handypack.hpp(179) : error C2143: syntax error : missing ',' before '<'
.\contrib/handypack/handypack.hpp(180) : error C2504: 'TVectorSerializer' : base class undefined
.\contrib/handypack/handypack.hpp(180) : error C2143: syntax error : missing ',' before '<'
.\contrib/handypack/handypack.hpp(181) : error C2504: 'TMapSerializer' : base class undefined
.\contrib/handypack/handypack.hpp(181) : see reference to class template instantiation 'NHandyPack::TSerializer<std::map<K,V>>' being compiled
.\contrib/handypack/handypack.hpp(181) : error C2143: syntax error : missing ',' before '<'
.\contrib/handypack/handypack.hpp(182) : error C2039: 'unordered_map' : is not a member of 'std'
.\contrib/handypack/handypack.hpp(182) : error C2065: 'unordered_map' : undeclared identifier
.\contrib/handypack/handypack.hpp(182) : error C2977: 'NHandyPack::TSerializer' : too many template arguments
.\contrib/handypack/handypack.hpp(18) : see declaration of 'NHandyPack::TSerializer'
.\contrib/handypack/handypack.hpp(182) : error C2143: syntax error : missing ';' before '>'
.\contrib/handypack/handypack.hpp(182) : error C2977: 'NHandyPack::TSerializer' : too many template arguments
.\contrib/handypack/handypack.hpp(18) : see declaration of 'NHandyPack::TSerializer'
.\contrib/handypack/handypack.hpp(182) : error C2059: syntax error : '>'
.\contrib/handypack/handypack.hpp(182) : fatal error C1003: error count exceeds 100; stopping compilation
error: command 'C:\Users\sasheth\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\cl.exe' failed with exit status 2


Failed building wheel for jamspell
Running setup.py clean for jamspell
Failed to build jamspell
Installing collected packages: jamspell
Running setup.py install for jamspell ... error
Complete output from command C:\ProgramData\Anaconda2\python.exe -u -c "import setuptools, tokenize;file='c:\users\sasheth\appdata\local\temp\pip-build-1pszkn\jamspell\setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record c:\users\sasheth\appdata\local\temp\pip-acckgt-record\install-record.txt --single-version-externally-managed --compile:
running install
running build_ext
building 'jamspell' extension
swigging jamspell.i to jamspell_wrap.cpp
C:\swigwin-3.0.12\swig.exe -python -c++ -o jamspell_wrap.cpp jamspell.i
creating build
creating build\temp.win32-2.7
creating build\temp.win32-2.7\Release
creating build\temp.win32-2.7\Release\jamspell
creating build\temp.win32-2.7\Release\contrib
creating build\temp.win32-2.7\Release\contrib\cityhash
creating build\temp.win32-2.7\Release\contrib\phf
C:\Users\sasheth\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -I. -Ijamspell -IC:\ProgramData\Anaconda2\include -IC:\ProgramData\Anaconda2\PC /Tpjamspell\lang_model.cpp /Fobuild\temp.win32-2.7\Release\jamspell\lang_model.obj -std=c++11 -O2
cl : Command line warning D9002 : ignoring unknown option '-std=c++11'
lang_model.cpp
C:\Users\sasheth\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Include\xlocale(342) : warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc
.\contrib/handypack/handypack.hpp(72) : error C2332: 'class' : missing tag name
.\contrib/handypack/handypack.hpp(72) : error C2993: '' : illegal type for non-type template parameter ''
.\contrib/handypack/handypack.hpp(72) : error C2143: syntax error : missing ',' before '...'
.\contrib/handypack/handypack.hpp(73) : error C2039: 'tuple' : is not a member of 'std'
.\contrib/handypack/handypack.hpp(73) : error C2065: 'tuple' : undeclared identifier
.\contrib/handypack/handypack.hpp(73) : error C2065: 'Args' : undeclared identifier
.\contrib/handypack/handypack.hpp(73) : error C2143: syntax error : missing ',' before '...'
.\contrib/handypack/handypack.hpp(73) : error C2143: syntax error : missing ';' before '{'
.\contrib/handypack/handypack.hpp(75) : error C2039: 'tuple' : is not a member of 'std'
.\contrib/handypack/handypack.hpp(75) : error C2143: syntax error : missing ';' before '{'
.\contrib/handypack/handypack.hpp(76) : error C2065: 'object' : undeclared identifier
.\contrib/handypack/handypack.hpp(76) : error C2059: syntax error : '...'
.\contrib/handypack/handypack.hpp(76) : error C2059: syntax error : ')'
.\contrib/handypack/handypack.hpp(77) : error C2143: syntax error : missing ';' before '}'
.\contrib/handypack/handypack.hpp(78) : error C2039: 'tuple' : is not a member of 'std'
.\contrib/handypack/handypack.hpp(78) : error C2065: 'tuple' : undeclared identifier
.\contrib/handypack/handypack.hpp(78) : error C2065: 'Args' : undeclared identifier
.\contrib/handypack/handypack.hpp(78) : error C2143: syntax error : missing ',' before '...'
.\contrib/handypack/handypack.hpp(78) : error C2143: syntax error : missing ';' before '{'
.\contrib/handypack/handypack.hpp(79) : error C2065: 'object' : undeclared identifier
.\contrib/handypack/handypack.hpp(79) : error C2059: syntax error : '...'
.\contrib/handypack/handypack.hpp(79) : error C2059: syntax error : ')'
.\contrib/handypack/handypack.hpp(80) : error C2143: syntax error : missing ';' before '}'
.\contrib/handypack/handypack.hpp(81) : error C2143: syntax error : missing ';' before '}'
.\contrib/handypack/handypack.hpp(83) : error C2947: expecting '>' to terminate template-argument-list, found '>'
.\contrib/handypack/handypack.hpp(83) : error C2975: 'NHandyPack::int
' : invalid template argument for 'unnamed-parameter', expected compile-time constant expression
.\contrib/handypack/handypack.hpp(48) : see declaration of 'NHandyPack::int_'
.\contrib/handypack/handypack.hpp(84) : error C2236: unexpected 'class' 'TVectorSerializer'. Did you forget a ';'?
.\contrib/handypack/handypack.hpp(84) : error C2143: syntax error : missing ')' before '{'
.\contrib/handypack/handypack.hpp(84) : error C2143: syntax error : missing ',' before ')'
.\contrib/handypack/handypack.hpp(84) : error C2143: syntax error : missing ';' before '{'
.\contrib/handypack/handypack.hpp(86) : error C2143: syntax error : missing ';' before '{'
.\contrib/handypack/handypack.hpp(88) : error C2065: 'size' : undeclared identifier
.\contrib/handypack/handypack.hpp(88) : error C2070: ''unknown-type'': illegal sizeof operand
.\contrib/handypack/handypack.hpp(88) : error C2143: syntax error : missing ',' before ')'
.\contrib/handypack/handypack.hpp(89) : error C2143: syntax error : missing ';' before '{'
.\contrib/handypack/handypack.hpp(90) : error C2065: 'obj' : undeclared identifier
.\contrib/handypack/handypack.hpp(91) : error C2143: syntax error : missing ';' before '}'
.\contrib/handypack/handypack.hpp(92) : error C2143: syntax error : missing ';' before '}'
.\contrib/handypack/handypack.hpp(94) : error C2065: 'TVec' : undeclared identifier
.\contrib/handypack/handypack.hpp(94) : error C2065: 'object' : undeclared identifier
.\contrib/handypack/handypack.hpp(94) : error C2143: syntax error : missing ',' before ')'
.\contrib/handypack/handypack.hpp(94) : error C2143: syntax error : missing ';' before '{'
.\contrib/handypack/handypack.hpp(96) : error C2065: 'size' : undeclared identifier
.\contrib/handypack/handypack.hpp(96) : error C2070: ''unknown-type'': illegal sizeof operand
.\contrib/handypack/handypack.hpp(96) : error C2143: syntax error : missing ',' before ')'
.\contrib/handypack/handypack.hpp(99) : error C2143: syntax error : missing ')' before ';'
.\contrib/handypack/handypack.hpp(99) : error C2059: syntax error : ')'
.\contrib/handypack/handypack.hpp(99) : error C2143: syntax error : missing ';' before '{'
.\contrib/handypack/handypack.hpp(101) : error C2065: 'obj' : undeclared identifier
.\contrib/handypack/handypack.hpp(102) : error C2039: 'move' : is not a member of 'std'
.\contrib/handypack/handypack.hpp(103) : error C2143: syntax error : missing ';' before '}'
.\contrib/handypack/handypack.hpp(104) : error C2143: syntax error : missing ';' before '}'
.\contrib/handypack/handypack.hpp(105) : error C2143: syntax error : missing ';' before '}'
.\contrib/handypack/handypack.hpp(107) : error C2947: expecting '>' to terminate template-argument-list, found '>'
.\contrib/handypack/handypack.hpp(107) : error C2977: 'NHandyPack::int_' : too many template arguments
.\contrib/handypack/handypack.hpp(48) : see declaration of 'NHandyPack::int_'
.\contrib/handypack/handypack.hpp(108) : error C2236: unexpected 'class' 'TMapSerializer'. Did you forget a ';'?
.\contrib/handypack/handypack.hpp(108) : error C2143: syntax error : missing ')' before '{'
.\contrib/handypack/handypack.hpp(108) : error C2143: syntax error : missing ',' before ')'
.\contrib/handypack/handypack.hpp(108) : error C2143: syntax error : missing ';' before '{'
.\contrib/handypack/handypack.hpp(110) : error C2143: syntax error : missing ';' before '{'
.\contrib/handypack/handypack.hpp(112) : error C2065: 'size' : undeclared identifier
.\contrib/handypack/handypack.hpp(112) : error C2070: ''unknown-type'': illegal sizeof operand
.\contrib/handypack/handypack.hpp(112) : error C2143: syntax error : missing ',' before ')'
.\contrib/handypack/handypack.hpp(113) : error C2143: syntax error : missing ';' before '{'
.\contrib/handypack/handypack.hpp(114) : error C2065: 'obj' : undeclared identifier
.\contrib/handypack/handypack.hpp(115) : error C2143: syntax error : missing ';' before '}'
.\contrib/handypack/handypack.hpp(116) : error C2143: syntax error : missing ';' before '}'
.\contrib/handypack/handypack.hpp(118) : error C2065: 'TVec' : undeclared identifier
.\contrib/handypack/handypack.hpp(118) : error C2065: 'object' : undeclared identifier
.\contrib/handypack/handypack.hpp(118) : error C2143: syntax error : missing ',' before ')'
.\contrib/handypack/handypack.hpp(118) : error C2143: syntax error : missing ';' before '{'
.\contrib/handypack/handypack.hpp(120) : error C2065: 'size' : undeclared identifier
.\contrib/handypack/handypack.hpp(120) : error C2070: ''unknown-type'': illegal sizeof operand
.\contrib/handypack/handypack.hpp(120) : error C2143: syntax error : missing ',' before ')'
.\contrib/handypack/handypack.hpp(122) : error C2143: syntax error : missing ')' before ';'
.\contrib/handypack/handypack.hpp(122) : error C2059: syntax error : ')'
.\contrib/handypack/handypack.hpp(122) : error C2143: syntax error : missing ';' before '{'
.\contrib/handypack/handypack.hpp(124) : error C2065: 'obj' : undeclared identifier
.\contrib/handypack/handypack.hpp(125) : error C2039: 'move' : is not a member of 'std'
.\contrib/handypack/handypack.hpp(126) : error C2143: syntax error : missing ';' before '}'
.\contrib/handypack/handypack.hpp(127) : error C2143: syntax error : missing ';' before '}'
.\contrib/handypack/handypack.hpp(128) : error C2143: syntax error : missing ';' before '}'
.\contrib/handypack/handypack.hpp(130) : error C2947: expecting '>' to terminate template-argument-list, found '>'
.\contrib/handypack/handypack.hpp(152) : error C2236: unexpected 'class' 'NHandyPack::TUnorderedMapSerializer'. Did you forget a ';'?
.\contrib/handypack/handypack.hpp(152) : error C3381: 'NHandyPack::TUnorderedMapSerializer' : assembly access specifiers are only available in code compiled with a /clr option
.\contrib/handypack/handypack.hpp(177) : error C2504: 'TVectorSerializer' : base class undefined
.\contrib/handypack/handypack.hpp(177) : see reference to class template instantiation 'NHandyPack::TSerializer<std::vector>' being compiled
.\contrib/handypack/handypack.hpp(177) : error C2143: syntax error : missing ',' before '<'
.\contrib/handypack/handypack.hpp(178) : error C2504: 'TVectorSerializer' : base class undefined
.\contrib/handypack/handypack.hpp(178) : see reference to class template instantiation 'NHandyPack::TSerializer<std::list>' being compiled
.\contrib/handypack/handypack.hpp(178) : error C2143: syntax error : missing ',' before '<'
.\contrib/handypack/handypack.hpp(179) : error C2504: 'TVectorSerializer' : base class undefined
.\contrib/handypack/handypack.hpp(179) : error C2143: syntax error : missing ',' before '<'
.\contrib/handypack/handypack.hpp(180) : error C2504: 'TVectorSerializer' : base class undefined
.\contrib/handypack/handypack.hpp(180) : error C2143: syntax error : missing ',' before '<'
.\contrib/handypack/handypack.hpp(181) : error C2504: 'TMapSerializer' : base class undefined
.\contrib/handypack/handypack.hpp(181) : see reference to class template instantiation 'NHandyPack::TSerializer<std::map<K,V>>' being compiled
.\contrib/handypack/handypack.hpp(181) : error C2143: syntax error : missing ',' before '<'
.\contrib/handypack/handypack.hpp(182) : error C2039: 'unordered_map' : is not a member of 'std'
.\contrib/handypack/handypack.hpp(182) : error C2065: 'unordered_map' : undeclared identifier
.\contrib/handypack/handypack.hpp(182) : error C2977: 'NHandyPack::TSerializer' : too many template arguments
.\contrib/handypack/handypack.hpp(18) : see declaration of 'NHandyPack::TSerializer'
.\contrib/handypack/handypack.hpp(182) : error C2143: syntax error : missing ';' before '>'
.\contrib/handypack/handypack.hpp(182) : error C2977: 'NHandyPack::TSerializer' : too many template arguments
.\contrib/handypack/handypack.hpp(18) : see declaration of 'NHandyPack::TSerializer'
.\contrib/handypack/handypack.hpp(182) : error C2059: syntax error : '>'
.\contrib/handypack/handypack.hpp(182) : fatal error C1003: error count exceeds 100; stopping compilation
error: command 'C:\Users\sasheth\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\cl.exe' failed with exit status 2

----------------------------------------

Command "C:\ProgramData\Anaconda2\python.exe -u -c "import setuptools, tokenize;file='c:\users\sasheth\appdata\local\temp\pip-build-1pszkn\jamspell\setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record c:\users\sasheth\appdata\local\temp\pip-acckgt-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in c:\users\sasheth\appdata\local\temp\pip-build-1pszkn\jamspell\

'failed building wheel' error

Hi, I've installed swig3 & can clone but not pip install jamspell — getting this error.
(jamspell) Admins-MacBook-Pro:bin me$ pip install jamspell
Collecting jamspell
Using cached https://files.pythonhosted.org/packages/5a/16/0a808e926a835604007066085cb2183b337694a06240a99945b31fa14f27/jamspell-0.0.11.tar.gz
Building wheels for collected packages: jamspell
Running setup.py bdist_wheel for jamspell ... error
Complete output from command /Users/me/virtualenv/jamspell/bin/python3.6 -u -c "import setuptools, tokenize;file='/private/var/folders/vc/3v1g1x612fqbprf__p0880dr0000gp/T/pip-install-brcz77zi/jamspell/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" bdist_wheel -d /private/var/folders/vc/3v1g1x612fqbprf__p0880dr0000gp/T/pip-wheel-ezr1d8z9 --python-tag cp36:
running bdist_wheel
running build
running build_ext
building '_jamspell' extension
swigging jamspell.i to jamspell_wrap.cpp
/usr/local/bin/swig -python -c++ -o jamspell_wrap.cpp jamspell.i
creating build
creating build/temp.macosx-10.6-intel-3.6
creating build/temp.macosx-10.6-intel-3.6/jamspell
creating build/temp.macosx-10.6-intel-3.6/contrib
creating build/temp.macosx-10.6-intel-3.6/contrib/cityhash
creating build/temp.macosx-10.6-intel-3.6/contrib/phf
/usr/bin/clang -fno-strict-aliasing -Wsign-compare -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -arch i386 -arch x86_64 -g -I. -Ijamspell -I/Library/Frameworks/Python.framework/Versions/3.6/include/python3.6m -c jamspell/lang_model.cpp -o build/temp.macosx-10.6-intel-3.6/jamspell/lang_model.o -std=c++11 -O2
In file included from jamspell/lang_model.cpp:9:
jamspell/lang_model.hpp:3:10: fatal error: 'unordered_map' file not found
#include <unordered_map>
^~~~~~~~~~~~~~~
1 error generated.
error: command '/usr/bin/clang' failed with exit status 1


Failed building wheel for jamspell
Running setup.py clean for jamspell
Failed to build jamspell
Installing collected packages: jamspell
Running setup.py install for jamspell ... error
Complete output from command /Users/me/virtualenv/jamspell/bin/python3.6 -u -c "import setuptools, tokenize;file='/private/var/folders/vc/3v1g1x612fqbprf__p0880dr0000gp/T/pip-install-brcz77zi/jamspell/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /private/var/folders/vc/3v1g1x612fqbprf__p0880dr0000gp/T/pip-record-x_y5l0_f/install-record.txt --single-version-externally-managed --compile --install-headers /Users/me/virtualenv/jamspell/bin/../include/site/python3.6/jamspell:
running install
running build_ext
building '_jamspell' extension
swigging jamspell.i to jamspell_wrap.cpp
/usr/local/bin/swig -python -c++ -o jamspell_wrap.cpp jamspell.i
creating build
creating build/temp.macosx-10.6-intel-3.6
creating build/temp.macosx-10.6-intel-3.6/jamspell
creating build/temp.macosx-10.6-intel-3.6/contrib
creating build/temp.macosx-10.6-intel-3.6/contrib/cityhash
creating build/temp.macosx-10.6-intel-3.6/contrib/phf
/usr/bin/clang -fno-strict-aliasing -Wsign-compare -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -arch i386 -arch x86_64 -g -I. -Ijamspell -I/Library/Frameworks/Python.framework/Versions/3.6/include/python3.6m -c jamspell/lang_model.cpp -o build/temp.macosx-10.6-intel-3.6/jamspell/lang_model.o -std=c++11 -O2
In file included from jamspell/lang_model.cpp:9:
jamspell/lang_model.hpp:3:10: fatal error: 'unordered_map' file not found
#include <unordered_map>
^~~~~~~~~~~~~~~
1 error generated.
error: command '/usr/bin/clang' failed with exit status 1

----------------------------------------

Command "/Users/me/virtualenv/jamspell/bin/python3.6 -u -c "import setuptools, tokenize;file='/private/var/folders/vc/3v1g1x612fqbprf__p0880dr0000gp/T/pip-install-brcz77zi/jamspell/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /private/var/folders/vc/3v1g1x612fqbprf__p0880dr0000gp/T/pip-record-x_y5l0_f/install-record.txt --single-version-externally-managed --compile --install-headers /Users/me/virtualenv/jamspell/bin/../include/site/python3.6/jamspell" failed with error code 1 in /private/var/folders/vc/3v1g1x612fqbprf__p0880dr0000gp/T/pip-install-brcz77zi/jamspell/

Python3 installation error

 File "/private/var/folders/vz/ybx331j17wxd9z6994w96rkc0000gn/T/pip-build-vbwbjsut/jamspell/setup.py", line 46, in find_swig
        assert subprocess.check_output([swigBinary, "-version"]).find('SWIG Version 3') != -1
    TypeError: a bytes-like object is required, not 'str'

What is the correct approach to handling letter case?

Thank you for the awesome library! Could you clarify if I'm using it correctly?

For now it does not handle letter case as I'd like. First, I'm trying to correct a typo in the word "best":

corrector.GetCandidates(['begt'], 0)
# ('best', 'beat', 'belt', 'bet', 'bent', 'beg', 'beet', 'begs', 'bert', 'beit', 'begt', 'begu', 'bengt', 'begat', 'beget')

It's perfect. But what if the word starts with an upper case letter:

corrector.GetCandidates(['Begt'], 0)
# ('get', 'set', 'left', 'next', 'best', 'west', 'went', 'east', 'got', 'yet', 'sent', 'eight', 'let', 'test', 'Begt')

Suggestions seem to be completely off.

Should it be my responsibility to lower everything and then restore case? Can it be solved by training the model on a larger data set?

Quality falling on large model

There is a report about falling quality while training model on a large dataset (1/4 wikipedia). Need to reproduce, check if this is text-related issue or something wrong with the model.

no check for capitalized words (e.g. german nouns)

Hello guys,
I need a german spellchecker for something I'm working on and thought this one might be the perfect one. I trained my own model, using around 550MB of the Leipzig Corpora dataset and the following alphabet: ABCDEFGHIJKLMNOPQRSTUVWXYZÄÖÜabcdefghijklkmnopqrstuvwxyzäöüß. I'm afraid the spellchecking only works properly on lowercased words. I think it is important to NOT lowercase everything, as in the German language, nouns always start with a capital letter. Is it possible to include capitalized words for the spellchecking?

Regards

Stucks on Windows (LoadLangModel)

Greetings to author!
There is problem with JamSpell on windows.
I got warning with "pip install jamspell":
C:\Users\bozzy>pip install jamspell
Collecting jamspell
Using cached
https://files.pythonhosted.org/packages/5a/16/0a808e926a835604007066085cb2183b337694a06240a99945b31fa14f27/jamspell-0.0.11.tar.gz
Installing collected packages: jamspell
Running setup.py install for jamspell ... done
Could not find .egg-info directory in install record for jamspell from https://files.pythonhosted.org/packages/5a/16/0a808e926a835604007066085cb2183b337694a06240a99945b31fa14f27/jamspell-0.0.11.tar.gz#sha256=6dcaf1ae631af6c0904f9ba016bf2404e930237eb73e4d471ee92a77327af8f1
Successfully installed jamspell
And then program stucks in "infinite loop" - nothing happens after calling corrector.LoadLangModel('en.bin') (from example in readme)
Also python process with jamspell running takes ~9.5 GB from 16 GB RAM.
WAIDW?

terminate called after throwing an instance of 'std::runtime_error' what(): locale::facet::_S_create_c_locale name not valid

(base) root@84b27fa8af50:/usr/app# git clone https://github.com/bakwc/JamSpell.git
Cloning into 'JamSpell'...
remote: Counting objects: 1010, done.
remote: Compressing objects: 100% (52/52), done.
remote: Total 1010 (delta 42), reused 79 (delta 38), pack-reused 913
Receiving objects: 100% (1010/1010), 676.87 KiB | 1.19 MiB/s, done.
Resolving deltas: 100% (621/621), done.
(base) root@84b27fa8af50:/usr/app# cd JamSpell
(base) root@84b27fa8af50:/usr/app/JamSpell# mkdir build
(base) root@84b27fa8af50:/usr/app/JamSpell# cd build
(base) root@84b27fa8af50:/usr/app/JamSpell/build# cmake ..
-- The C compiler identification is GNU 6.3.0
-- The CXX compiler identification is GNU 6.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Could NOT find GTest (missing:  GTEST_LIBRARY GTEST_INCLUDE_DIR GTEST_MAIN_LIBRARY)
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Configuring done
-- Generating done
-- Build files have been written to: /usr/app/JamSpell/build
(base) root@84b27fa8af50:/usr/app/JamSpell/build# make
Scanning dependencies of target cityhash
[  4%] Building CXX object contrib/cityhash/CMakeFiles/cityhash.dir/city.cc.o
[  8%] Linking CXX static library libcityhash.a
[  8%] Built target cityhash
Scanning dependencies of target phf
[ 12%] Building CXX object contrib/phf/CMakeFiles/phf.dir/phf.cc.o
[ 16%] Linking CXX static library libphf.a
[ 16%] Built target phf
Scanning dependencies of target jamspell_lib
[ 20%] Building CXX object jamspell/CMakeFiles/jamspell_lib.dir/spell_corrector.cpp.o
[ 25%] Building CXX object jamspell/CMakeFiles/jamspell_lib.dir/lang_model.cpp.o
[ 29%] Building CXX object jamspell/CMakeFiles/jamspell_lib.dir/utils.cpp.o
[ 33%] Building CXX object jamspell/CMakeFiles/jamspell_lib.dir/perfect_hash.cpp.o
[ 37%] Building CXX object jamspell/CMakeFiles/jamspell_lib.dir/bloom_filter.cpp.o
[ 41%] Linking CXX static library libjamspell_lib.a
[ 41%] Built target jamspell_lib
Scanning dependencies of target jamspell
[ 45%] Building CXX object main/CMakeFiles/jamspell.dir/main.cpp.o
[ 50%] Linking CXX executable jamspell
[ 50%] Built target jamspell
Scanning dependencies of target handypack
[ 54%] Building CXX object contrib/handypack/CMakeFiles/handypack.dir/handypack.cpp.o
[ 58%] Linking CXX static library libhandypack.a
[ 58%] Built target handypack
Scanning dependencies of target bloom
[ 62%] Building CXX object contrib/bloom/CMakeFiles/bloom.dir/bloom_filter.cpp.o
[ 66%] Linking CXX static library libbloom.a
[ 66%] Built target bloom
Scanning dependencies of target tsl
[ 70%] Building CXX object contrib/tsl/CMakeFiles/tsl.dir/robin_map.cpp.o
[ 75%] Linking CXX static library libtsl.a
[ 75%] Built target tsl
Scanning dependencies of target httplib
[ 79%] Building CXX object contrib/httplib/CMakeFiles/httplib.dir/httplib.cpp.o
[ 83%] Linking CXX static library libhttplib.a
[ 83%] Built target httplib
Scanning dependencies of target nlohmann_json
[ 87%] Building CXX object contrib/nlohmann/CMakeFiles/nlohmann_json.dir/json.cpp.o
[ 91%] Linking CXX static library libnlohmann_json.a
[ 91%] Built target nlohmann_json
Scanning dependencies of target web_server
[ 95%] Building CXX object web_server/CMakeFiles/web_server.dir/main.cpp.o
[100%] Linking CXX executable web_server
[100%] Built target web_server
(base) root@84b27fa8af50:/usr/app/JamSpell/build# ls
CMakeCache.txt	CMakeFiles  Makefile  cmake_install.cmake  contrib  jamspell  main  web_server
(base) root@84b27fa8af50:/usr/app/JamSpell/build# ls jamspell/
CMakeFiles  Makefile  cmake_install.cmake  libjamspell_lib.a
(base) root@84b27fa8af50:/usr/app/JamSpell/build# cd ..
(base) root@84b27fa8af50:/usr/app/JamSpell# ls
CMakeLists.txt	LICENSE  MANIFEST.in  README.md  build	clear.sh  contrib  evaluate  jamspell  jamspell.i  main  setup.cfg  setup.py  test_data  test_jamspell.py  tests  web_server
(base) root@84b27fa8af50:/usr/app/JamSpell# python setup.py install
running install
running build_ext
building '_jamspell' extension
swigging jamspell.i to jamspell_wrap.cpp
/usr/bin/swig3.0 -python -c++ -o jamspell_wrap.cpp jamspell.i
creating build/temp.linux-x86_64-3.6
creating build/temp.linux-x86_64-3.6/jamspell
creating build/temp.linux-x86_64-3.6/contrib
creating build/temp.linux-x86_64-3.6/contrib/cityhash
creating build/temp.linux-x86_64-3.6/contrib/phf
gcc -pthread -B /opt/conda/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I. -Ijamspell -I/opt/conda/include/python3.6m -c jamspell/lang_model.cpp -o build/temp.linux-x86_64-3.6/jamspell/lang_model.o -std=c++11 -O2
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
gcc -pthread -B /opt/conda/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I. -Ijamspell -I/opt/conda/include/python3.6m -c jamspell/spell_corrector.cpp -o build/temp.linux-x86_64-3.6/jamspell/spell_corrector.o -std=c++11 -O2
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
gcc -pthread -B /opt/conda/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I. -Ijamspell -I/opt/conda/include/python3.6m -c jamspell/utils.cpp -o build/temp.linux-x86_64-3.6/jamspell/utils.o -std=c++11 -O2
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
gcc -pthread -B /opt/conda/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I. -Ijamspell -I/opt/conda/include/python3.6m -c jamspell/perfect_hash.cpp -o build/temp.linux-x86_64-3.6/jamspell/perfect_hash.o -std=c++11 -O2
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
gcc -pthread -B /opt/conda/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I. -Ijamspell -I/opt/conda/include/python3.6m -c jamspell/bloom_filter.cpp -o build/temp.linux-x86_64-3.6/jamspell/bloom_filter.o -std=c++11 -O2
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
gcc -pthread -B /opt/conda/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I. -Ijamspell -I/opt/conda/include/python3.6m -c contrib/cityhash/city.cc -o build/temp.linux-x86_64-3.6/contrib/cityhash/city.o -std=c++11 -O2
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
gcc -pthread -B /opt/conda/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I. -Ijamspell -I/opt/conda/include/python3.6m -c contrib/phf/phf.cc -o build/temp.linux-x86_64-3.6/contrib/phf/phf.o -std=c++11 -O2
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
gcc -pthread -B /opt/conda/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I. -Ijamspell -I/opt/conda/include/python3.6m -c jamspell_wrap.cpp -o build/temp.linux-x86_64-3.6/jamspell_wrap.o -std=c++11 -O2
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
creating build/lib.linux-x86_64-3.6
g++ -pthread -shared -B /opt/conda/compiler_compat -L/opt/conda/lib -Wl,-rpath=/opt/conda/lib -Wl,--no-as-needed -Wl,--sysroot=/ build/temp.linux-x86_64-3.6/jamspell/lang_model.o build/temp.linux-x86_64-3.6/jamspell/spell_corrector.o build/temp.linux-x86_64-3.6/jamspell/utils.o build/temp.linux-x86_64-3.6/jamspell/perfect_hash.o build/temp.linux-x86_64-3.6/jamspell/bloom_filter.o build/temp.linux-x86_64-3.6/contrib/cityhash/city.o build/temp.linux-x86_64-3.6/contrib/phf/phf.o build/temp.linux-x86_64-3.6/jamspell_wrap.o -o build/lib.linux-x86_64-3.6/_jamspell.cpython-36m-x86_64-linux-gnu.so
running bdist_egg
running egg_info
creating jamspell.egg-info
writing jamspell.egg-info/PKG-INFO
writing dependency_links to jamspell.egg-info/dependency_links.txt
writing top-level names to jamspell.egg-info/top_level.txt
writing manifest file 'jamspell.egg-info/SOURCES.txt'
reading manifest file 'jamspell.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'jamspell.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
copying jamspell.py -> build/lib.linux-x86_64-3.6
creating build/bdist.linux-x86_64
creating build/bdist.linux-x86_64/egg
copying build/lib.linux-x86_64-3.6/_jamspell.cpython-36m-x86_64-linux-gnu.so -> build/bdist.linux-x86_64/egg
copying build/lib.linux-x86_64-3.6/jamspell.py -> build/bdist.linux-x86_64/egg
byte-compiling build/bdist.linux-x86_64/egg/jamspell.py to jamspell.cpython-36.pyc
creating stub loader for _jamspell.cpython-36m-x86_64-linux-gnu.so
byte-compiling build/bdist.linux-x86_64/egg/_jamspell.py to _jamspell.cpython-36.pyc
creating build/bdist.linux-x86_64/egg/EGG-INFO
copying jamspell.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO
copying jamspell.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying jamspell.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying jamspell.egg-info/not-zip-safe -> build/bdist.linux-x86_64/egg/EGG-INFO
copying jamspell.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
writing build/bdist.linux-x86_64/egg/EGG-INFO/native_libs.txt
creating dist
creating 'dist/jamspell-0.0.11-py3.6-linux-x86_64.egg' and adding 'build/bdist.linux-x86_64/egg' to it
removing 'build/bdist.linux-x86_64/egg' (and everything under it)
Creating /opt/conda/lib/python3.6/site-packages/site.py
Processing jamspell-0.0.11-py3.6-linux-x86_64.egg
creating /opt/conda/lib/python3.6/site-packages/jamspell-0.0.11-py3.6-linux-x86_64.egg
Extracting jamspell-0.0.11-py3.6-linux-x86_64.egg to /opt/conda/lib/python3.6/site-packages
Adding jamspell 0.0.11 to easy-install.pth file

Installed /opt/conda/lib/python3.6/site-packages/jamspell-0.0.11-py3.6-linux-x86_64.egg
Processing dependencies for jamspell==0.0.11
Finished processing dependencies for jamspell==0.0.11
(base) root@84b27fa8af50:/usr/app/JamSpell# ipython
iPython 3.6.4 |Anaconda, Inc.| (default, Jan 16 2018, 18:10:19)
Type 'copyright', 'credits' or 'license' for more information
IPython 6.2.1 -- An enhanced Interactive Python. Type '?' for help.

In [1]: import jamspell
terminate called after throwing an instance of 'std::runtime_error'
  what():  locale::facet::_S_create_c_locale name not valid
Aborted

Failure of installation in Google Colab

I tried to install Jamspell in Google Colab. But it shows this error. I used Python 3 and GPU

File "/tmp/pip-install-torr9p4t/jamspell/setup.py", line 45, in find_swig
assert swigBinary is not None
AssertionError

----------------------------------------

Command "/usr/bin/python3 -u -c "import setuptools, tokenize;file='/tmp/pip-install-torr9p4t/jamspell/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-record-ws9l_rnc/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-torr9p4t/jamspell/

Model is not cross-platform

The generated model file isn't cross platform: Trying to load a model file generated in a Windows computer on a Linux computer or vice-versa causes JamSpell to hang forever.

Here are the files you can use to reproduce the issue. The windows.bin model was trained on Windows 10 64-bit, and the linux.bin model was trained on Ubuntu 18.04 64-bit (through the Windows WSL), both using the provided alphabet.txt and data.txt

suffix or operands invalid for `movq'

I'm tried to
$sudo pip install jamspell
but I kept on having 'gcc' failing due to gcc version being 4.x. I upgraded to 5 and tried again this time to have:

/var/folders/mf/h5xtzctd6rbg0v_j86qcs4c80000gp/T//cc1lsN9e.s:11961:suffix or operands invalid for `movq'
/var/folders/mf/h5xtzctd6rbg0v_j86qcs4c80000gp/T//cc1lsN9e.s:12074:suffix or operands invalid for `movq'
/var/folders/mf/h5xtzctd6rbg0v_j86qcs4c80000gp/T//cc1lsN9e.s:20893:suffix or operands invalid for `movq'
/var/folders/mf/h5xtzctd6rbg0v_j86qcs4c80000gp/T//cc1lsN9e.s:20906:suffix or operands invalid for `movq'
error: command 'gcc' failed with exit status 1

I'm running OSX high sierra (10.13.5) and

$gcc -v

gives out:

COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/local/Cellar/gcc/5.3.0/libexec/gcc/x86_64-apple-darwin15.0.0/5.3.0/lto-wrapper
Target: x86_64-apple-darwin15.0.0
Configured with: ../configure --build=x86_64-apple-darwin15.0.0 --prefix=/usr/local/Cellar/gcc/5.3.0 --libdir=/usr/local/Cellar/gcc/5.3.0/lib/gcc/5 --enable-languages=c,c++,objc,obj-c++,fortran --program-suffix=-5 --with-gmp=/usr/local/opt/gmp --with-mpfr=/usr/local/opt/mpfr --with-mpc=/usr/local/opt/libmpc --with-isl=/usr/local/opt/isl --with-system-zlib --enable-libstdcxx-time=yes --enable-stage1-checking --enable-checking=release --enable-lto --with-build-config=bootstrap-debug --disable-werror --with-pkgversion='Homebrew gcc 5.3.0' --with-bugurl=https://github.com/Homebrew/homebrew/issues --enable-plugin --disable-nls --enable-multilib
Thread model: posix
gcc version 5.3.0 (Homebrew gcc 5.3.0) 

Can't wait to use this library.

A problem to train a model for Russian language

  1. I took 5 million lines from Russian wikipedia dump (extracted text), create alphabet_ru.txt with the following text (all files in UTF-8):
    абвгдеёжзийклмнопрстуфхцчьъшщыэюя

  2. I trained a model:
    ~/JamSpell/build$ ./main/jamspell train alphabet_ru.txt ~/Downloads/xaa model_wiki_ru.bin
    [info] loading text
    [info] generating N-grams 0
    [info] processed 0%
    [info] generating keys
    [info] ngrams1: 1592588
    [info] ngrams2: 27563594
    [info] ngrams3: 57626371
    [info] total: 86782553
    [info] generating perf hash
    [info] finished, buckets: 108478199
    [info] buckets filled

It looks like it was created without errors but when I tried to correct misspelled words it doesn't work:

import jamspell
corrector = jamspell.TSpellCorrector()
corrector.LoadLangModel('model_wiki_ru.bin')
corrector.FixFragment(u'Папа пощел погуоять в метро.')

corrector.GetCandidates([u'погуоять'], 0)
()

"пощел погуоять" weren't corrected! In the same time your small model correct these words!
I tried phrases with several completely corrupted words with zero effect, no correct, no suggestions

Where is my mistake?

Confidence level of candidates

I would like to know if there is a way to access confidence level/score for each candidate. For example, in the output below, can we know that the model is 90% confident it's "table", 4% confident its "tale" etc.?
{ "results": [ { "candidates": [ "table", "tale", "tacle", "tadle", "ladle", "tadre" ], "len": 5, "pos_from": 0 } ] }

I'm having a requirement where I need to apply the fix with top candidate only if the confidence level is above 90%. Would like to understand if you already have this facility or any plans to implement in future.

Jamspell not able to train model for corpus larger than a certain size

Hi
Jamspell throws error and stops when trying to read a 15.3 GB file for training. It however doesn't fail for other files of much smaller size.

./main/jamspell train ../test_data/alphabet_en.txt ../test_data/combined.txt model_combined.bin
[info] loading text
terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc
Aborted (core dumped)

Model created on Linux doesn't load on Windows

I have run Jamspell on RHEL, Ubuntu and Windows.
The models we create on Windows can be loaded there however models created on other OS can't be loaded on Windows machine. Since my Windows machine doesn't have as much ram as the linux ones this is a problem for me.

Ignore some words

Some words, usually entities (product names, organization names, etc), are autocorrected. It would be nice if we could pass in a list of words to the corrector to be ignored.

[Enhancement] Pre-Trained Model for the german language

Hey, I am working on an enhanced spell check app. It's all in German. I used the recommended training data from the Leipzig University and merged all usable data.
I trained as described in the Readme.md with ~5 million sentences on a high performance server.
May some of you guys find this useful.

Alphabet

abcdefghijklmnopqrstuvwxyzäöüß

Log

valerius@ubuntu-s-20vcpu-96gb-fra1-01:~/code/JamSpell/build/main$ python3 ~/code/JamSpell/evaluate/evaluate.py -a ./alphabet_ger.txt -jsp trained_ger.bin -mx 50000 ~/AUTO/TEXT/test.txt 
[info] loading models
[info] loading text
[info] generating typos
[info] total words: 76209
[info] evaluating
[debug] jamspell: processed 20.48%, error rate: 2.14%
[debug] jamspell: processed 40.73%, error rate: 2.21%
[debug] jamspell: processed 60.67%, error rate: 2.18%
[debug] jamspell: processed 79.80%, error rate: 2.13%
[debug] jamspell: processed 98.61%, error rate: 2.14%

[info]               errRate   fixRate    broken   topNerr   topNfix      time
[info]   jamspell      2.13%    86.79%     0.04%     1.16%    88.09%    20.32s
[info]      dummy     15.92%     0.00%     0.00%    15.92%     0.00% #    0.07s

Download

trained_ger.bin (431.7 MB)

Unable to produce results (C++)

I am unable to produce any errors with FixFragment() or GetCandidates(). I have done the following:

  1. Added both jamspell/ and contrib/ directories to my project and included the header file.
  2. Added the following lines to my main:
NJamSpell::TSpellCorrector corrector;
corrector.LoadLangModel("model.bin");

std::string msg = NJamSpell::WideToUTF8(corrector.FixFragment(L"I am the begt spell cherken!"));
  1. msg results in: "I am the begt spell cherken!".

If I add any other string to LoadLangModel("model.bin"), no error is produced. Have I not imported the files correctly?

Thanks again for this repository (and including benchmarks against other tools). Cheers!

On MacOS: collate_byname failed to construct for en_US.utf-8

Python 3.6.5 (default, Apr 25 2018, 14:23:58)
[GCC 4.2.1 Compatible Apple LLVM 9.1.0 (clang-902.0.39.1)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import jamspell
>>> corrector = jamspell.TSpellCorrector()
libc++abi.dylib: terminating with uncaught exception of type std::runtime_error: collate_byname<char>::collate_byname failed to construct for en_US.utf-8

I see locale is hardcoded here =>

: Locale("en_US.utf-8")
, why ?

Runtime error on Ubuntu 16.04

I am using the Python bindings for Jamspell. Assuming that I have the following Dockerfile:

FROM ubuntu:16.04

RUN apt-get update

RUN apt-get install -y software-properties-common
RUN add-apt-repository ppa:jonathonf/python-3.6
RUN apt-get update

RUN apt install -y build-essential libstdc++6 wget git swig libssl-dev python3.6 python3.6-dev python3-pip python3.6-venv

ENV LANG C.UTF-8
ENV LC_ALL C.UTF-8

RUN python3.6 -m pip install pip --upgrade
RUN python3.6 -m pip install wheel

COPY . /app

WORKDIR /app

RUN python3.6 -m pip install -r requirements.txt

CMD ["python3.6", "-m", "http.server"]

I get the following error on import jamspell:

terminate called after throwing an instance of 'std::runtime_error'
  what():  locale::facet::_S_create_c_locale name not valid

The locales are set with the ENV directives and when checking the locales with locale on interactive terminal in Docker, LANG and LC_ALL are set. Is there anything that I'm missing with my dependencies?

Cheers,
steph

Installing jamspell

Hello, I'm try to install jamspell in docker python 3.6.3 constainer and I have error:

         #include <codecvt>
                           ^
    compilation terminated.
    error: command 'gcc' failed with exit status 1

How to avoid this problem?


gcc version:

Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.9/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 4.9.2-10' --with-bugurl=file:///usr/share/doc/gcc-4.9/README.Bugs --enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.9 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.9 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.9-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.9-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.9-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --with-arch-32=i586 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.9.2 (Debian 4.9.2-10)

Readme File Typo

A small typo in readme file which is not at all noticeable always. Please fix this.

python evaluate/evalute.py -a alphabet_file.txt -jsp your_model.bin -mx 50000 your_test_data.txt

the spelling of evaluate is wrong here, surprisingly it caused me a lil pain.

Since the file generated is evaluate.py and not evalute.py.

python evaluate/evaluate.py -a alphabet_file.txt -jsp your_model.bin -mx 50000 your_test_data.txt

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.