[Python-modules-commits] [sphinxcontrib-spelling] 02/05: Import sphinxcontrib-spelling_2.3.0.orig.tar.gz

Daniele Tricoli eriol-guest at moszumanska.debian.org
Thu Dec 8 23:01:25 UTC 2016


This is an automated email from the git hooks/post-receive script.

eriol-guest pushed a commit to branch master
in repository sphinxcontrib-spelling.

commit 1834b8efbc429ce97528a141c4fa92b8fb5ccdfa
Author: Daniele Tricoli <eriol at mornie.org>
Date:   Thu Dec 8 22:08:04 2016 +0100

    Import sphinxcontrib-spelling_2.3.0.orig.tar.gz
---
 AUTHORS                                      |  1 +
 ChangeLog                                    |  6 ++++++
 PKG-INFO                                     |  2 +-
 docs/source/customize.rst                    |  3 +++
 setup.cfg                                    |  2 +-
 sphinxcontrib/spelling/__init__.py           |  2 ++
 sphinxcontrib/spelling/builder.py            |  1 +
 sphinxcontrib/spelling/checker.py            |  4 ++--
 sphinxcontrib/spelling/tests/test_checker.py | 10 ++++++++++
 sphinxcontrib_spelling.egg-info/PKG-INFO     |  2 +-
 sphinxcontrib_spelling.egg-info/pbr.json     |  2 +-
 11 files changed, 29 insertions(+), 6 deletions(-)

diff --git a/AUTHORS b/AUTHORS
index 3f58564..14012ed 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -40,6 +40,7 @@ Sebastian Wiesner <lunaryorn at googlemail.com>
 Stephen Sugden <glurgle at gmail.com>
 Takumi IINO <trot.thunder at gmail.com>
 Tero Koskinen <tero.koskinen at iki.fi>
+Timotheus Kampik <timotheus.kampik at signavio.com>
 Vadim Gubergrits <vadim.gubergrits at gmail.com>
 Wei-Wei Guo <wwguocn at gmail.com>
 Yuya Nishihara <yuya at tcha.org>
diff --git a/ChangeLog b/ChangeLog
index 0915897..e2976a2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,12 @@
 CHANGES
 =======
 
+2.3.0
+-----
+
+* Merged in TimKam/sphinxcontrib-spelling/7-make-tokenizer-configurable (pull request #7
+* make it possible to specify tokenizer #7
+
 2.2.0
 -----
 
diff --git a/PKG-INFO b/PKG-INFO
index 1208714..d071c27 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: sphinxcontrib-spelling
-Version: 2.2.0
+Version: 2.3.0
 Summary: Sphinx spelling extension
 Home-page: http://bitbucket.org/dhellmann/sphinxcontrib-spelling
 Author: Doug Hellmann
diff --git a/docs/source/customize.rst b/docs/source/customize.rst
index 27fd623..45a34e6 100644
--- a/docs/source/customize.rst
+++ b/docs/source/customize.rst
@@ -15,6 +15,9 @@ Input Options
 ``spelling_lang='en_US'``
   String specifying the language, as understood by PyEnchant and
   enchant.  Defaults to ``en_US`` for US English.
+``tokenizer_lang='en_US'``
+    String specifying the tokenizer language as understood by PyEnchant
+    and enchant. Defaults to ``en_US`` for US English.
 ``spelling_word_list_filename='spelling_wordlist.txt'``
   String specifying a file containing a list of words known to be
   spelled correctly but that do not appear in the language dictionary
diff --git a/setup.cfg b/setup.cfg
index 420aaa6..61045d7 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -30,8 +30,8 @@ namespace_packages =
 
 [egg_info]
 tag_date = 0
-tag_build = 
 tag_svn_revision = 0
+tag_build = 
 
 [aliases]
 release = egg_info -RDb ''
diff --git a/sphinxcontrib/spelling/__init__.py b/sphinxcontrib/spelling/__init__.py
index 96c3097..02e63fa 100644
--- a/sphinxcontrib/spelling/__init__.py
+++ b/sphinxcontrib/spelling/__init__.py
@@ -17,6 +17,8 @@ def setup(app):
     app.add_config_value('spelling_show_suggestions', False, 'env')
     # Set the language for the text
     app.add_config_value('spelling_lang', 'en_US', 'env')
+    # Set the language for the tokenizer
+    app.add_config_value('tokenizer_lang', 'en_US', 'env')
     # Set a user-provided list of words known to be spelled properly
     app.add_config_value('spelling_word_list_filename',
                          'spelling_wordlist.txt',
diff --git a/sphinxcontrib/spelling/builder.py b/sphinxcontrib/spelling/builder.py
index c72709a..ce7ed30 100644
--- a/sphinxcontrib/spelling/builder.py
+++ b/sphinxcontrib/spelling/builder.py
@@ -59,6 +59,7 @@ class SpellingBuilder(Builder):
                                      self.config.spelling_word_list_filename)
         self.checker = checker.SpellingChecker(
             lang=self.config.spelling_lang,
+            tokenizer_lang=self.config.tokenizer_lang,
             suggest=self.config.spelling_show_suggestions,
             word_list_filename=project_words,
             filters=f,
diff --git a/sphinxcontrib/spelling/checker.py b/sphinxcontrib/spelling/checker.py
index ea77061..09e6bae 100644
--- a/sphinxcontrib/spelling/checker.py
+++ b/sphinxcontrib/spelling/checker.py
@@ -16,9 +16,9 @@ class SpellingChecker(object):
     the checking and filtering behavior.
     """
 
-    def __init__(self, lang, suggest, word_list_filename, filters=[]):
+    def __init__(self, lang, suggest, word_list_filename, tokenizer_lang='en_US', filters=[]):
         self.dictionary = enchant.DictWithPWL(lang, word_list_filename)
-        self.tokenizer = get_tokenizer(lang, filters)
+        self.tokenizer = get_tokenizer(tokenizer_lang, filters)
         self.original_tokenizer = self.tokenizer
         self.suggest = suggest
 
diff --git a/sphinxcontrib/spelling/tests/test_checker.py b/sphinxcontrib/spelling/tests/test_checker.py
index 4316d0f..c322ba0 100644
--- a/sphinxcontrib/spelling/tests/test_checker.py
+++ b/sphinxcontrib/spelling/tests/test_checker.py
@@ -42,3 +42,13 @@ def test_with_wordlist():
     words = [w for w, s in checker.check('This txt is wrong')]
     assert not words, 'Did not use personal word list file'
     return
+
+
+def test_non_english():
+    checker = SpellingChecker(lang='de_DE',
+                              suggest=False,
+                              word_list_filename=None,
+                              )
+    for word, suggestions in checker.check('Dieser Txt ist falsch'):
+        assert word == 'Txt'
+    return
\ No newline at end of file
diff --git a/sphinxcontrib_spelling.egg-info/PKG-INFO b/sphinxcontrib_spelling.egg-info/PKG-INFO
index 1208714..d071c27 100644
--- a/sphinxcontrib_spelling.egg-info/PKG-INFO
+++ b/sphinxcontrib_spelling.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: sphinxcontrib-spelling
-Version: 2.2.0
+Version: 2.3.0
 Summary: Sphinx spelling extension
 Home-page: http://bitbucket.org/dhellmann/sphinxcontrib-spelling
 Author: Doug Hellmann
diff --git a/sphinxcontrib_spelling.egg-info/pbr.json b/sphinxcontrib_spelling.egg-info/pbr.json
index 21a7b1d..1db14cd 100644
--- a/sphinxcontrib_spelling.egg-info/pbr.json
+++ b/sphinxcontrib_spelling.egg-info/pbr.json
@@ -1 +1 @@
-{"git_version": "fc11b4d", "is_release": true}
\ No newline at end of file
+{"git_version": "d3209e7", "is_release": true}
\ No newline at end of file

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/sphinxcontrib-spelling.git



More information about the Python-modules-commits mailing list