Skip to content

Commit

Permalink
always use lowercase language identifiers (#25)
Browse files Browse the repository at this point in the history
* always use lowercase language identifiers
* version bump; add python 3.7 to travis
  • Loading branch information
barrust authored Nov 10, 2018
1 parent 1603837 commit 096a265
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 8 deletions.
14 changes: 9 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
language: python
python:
- "3.3"
- "3.4"
- "3.5"
- "3.6"
matrix:
include:
- python: 3.3
- python: 3.4
- python: 3.5
- python: 3.6
- python: 3.7
dist: xenial
sudo: true

install:
- pip install -r requirements/requirements-dev.txt
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# pyspellchecker

## Version 0.2.1
* Ignore case for language identifiers

## Version 0.2.0
* Changed `words` function to `split_words` to differentiate with the `word_frequency.words` function
* Added ***Portuguese*** dictionary: `pt`
Expand Down
2 changes: 1 addition & 1 deletion spellchecker/info.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
__maintainer__ = 'Tyler Barrus'
__email__ = 'barrust@gmail.com'
__license__ = 'MIT'
__version__ = '0.2.0'
__version__ = '0.2.1'
__credits__ = ['Peter Norvig']
__url__ = 'https://github.com/barrust/pyspellchecker'
__bugtrack_url__ = '{0}/issues'.format(__url__)
4 changes: 2 additions & 2 deletions spellchecker/spellchecker.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ def __init__(self, language='en', local_dictionary=None, distance=2):
if local_dictionary:
self._word_frequency.load_dictionary(local_dictionary)
elif language:
filename = '{}.json.gz'.format(language)
filename = '{}.json.gz'.format(language.lower())
here = os.path.dirname(__file__)
full_filename = os.path.join(here, 'resources', filename)
if not os.path.exists(full_filename):
msg = ('The provided dictionary language ({}) does not '
'exist!').format(language)
'exist!').format(language.lower())
raise ValueError(msg)
self._word_frequency.load_dictionary(full_filename)

Expand Down

0 comments on commit 096a265

Please sign in to comment.