mirror of
https://github.com/explosion/spaCy.git
synced 2025-01-26 01:04:34 +03:00
Merge pull request #148 from maxirmx/master
Utf8 encoding for lemma_rules.json
This commit is contained in:
commit
3be94be0c0
|
@ -8,16 +8,24 @@ environment:
|
||||||
matrix:
|
matrix:
|
||||||
|
|
||||||
# Python 2.7.10 is the latest version and is not pre-installed.
|
# Python 2.7.10 is the latest version and is not pre-installed.
|
||||||
|
|
||||||
- PYTHON: "C:\\Python27.10-x64"
|
- PYTHON: "C:\\Python27.10-x64"
|
||||||
PYTHON_VERSION: "2.7.10"
|
PYTHON_VERSION: "2.7.10"
|
||||||
PYTHON_ARCH: "64"
|
PYTHON_ARCH: "64"
|
||||||
|
|
||||||
|
- PYTHON: "C:\\Python27.10-x32"
|
||||||
|
PYTHON_VERSION: "2.7.10"
|
||||||
|
PYTHON_ARCH: "32"
|
||||||
|
|
||||||
# The lastest Python 3.4.
|
# The lastest Python 3.4.
|
||||||
- PYTHON: "C:\\Python34-x64"
|
- PYTHON: "C:\\Python34-x64"
|
||||||
PYTHON_VERSION: "3.4.x" # currently 3.4.3
|
PYTHON_VERSION: "3.4.x" # currently 3.4.3
|
||||||
PYTHON_ARCH: "64"
|
PYTHON_ARCH: "64"
|
||||||
|
|
||||||
|
#- PYTHON: "C:\\Python34-x32"
|
||||||
|
# PYTHON_VERSION: "3.4.x" # currently 3.4.3
|
||||||
|
# PYTHON_ARCH: "32"
|
||||||
|
|
||||||
|
|
||||||
install:
|
install:
|
||||||
# Install Python (from the official .msi of http://python.org) and pip when
|
# Install Python (from the official .msi of http://python.org) and pip when
|
||||||
# not already installed.
|
# not already installed.
|
||||||
|
@ -30,10 +38,11 @@ install:
|
||||||
- "SET PYTHONPATH=%CD%;%PYTHONPATH%"
|
- "SET PYTHONPATH=%CD%;%PYTHONPATH%"
|
||||||
|
|
||||||
# Filesystem root
|
# Filesystem root
|
||||||
# - ps: "ls \"C:/\""
|
#- ps: "ls \"C:/\""
|
||||||
|
#- SET
|
||||||
|
|
||||||
# Installed SDKs
|
# Installed SDKs
|
||||||
# - ps: "ls \"C:/Program Files/Microsoft SDKs/Windows\""
|
#- ps: "ls \"C:/Program Files/Microsoft SDKs/Windows\""
|
||||||
|
|
||||||
# Checking stdint.h
|
# Checking stdint.h
|
||||||
#- ps: "ls \"C:/projects/spacy/include/\""
|
#- ps: "ls \"C:/projects/spacy/include/\""
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
|
|
||||||
|
<img src="https://ci.appveyor.com/api/projects/status/aoe3dtkep36rdaqf?svg=true" />
|
||||||
|
|
||||||
spaCy: Industrial-strength NLP
|
spaCy: Industrial-strength NLP
|
||||||
==============================
|
==============================
|
||||||
|
|
||||||
|
@ -49,3 +52,6 @@ Difficult to support:
|
||||||
|
|
||||||
* PyPy 2.7
|
* PyPy 2.7
|
||||||
* PyPy 3.4
|
* PyPy 3.4
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@ class Lemmatizer(object):
|
||||||
index[pos] = read_index(path.join(data_dir, 'wordnet', 'index.%s' % pos))
|
index[pos] = read_index(path.join(data_dir, 'wordnet', 'index.%s' % pos))
|
||||||
exc[pos] = read_exc(path.join(data_dir, 'wordnet', '%s.exc' % pos))
|
exc[pos] = read_exc(path.join(data_dir, 'wordnet', '%s.exc' % pos))
|
||||||
if path.exists(path.join(data_dir, 'vocab', 'lemma_rules.json')):
|
if path.exists(path.join(data_dir, 'vocab', 'lemma_rules.json')):
|
||||||
rules = json.load(open(path.join(data_dir, 'vocab', 'lemma_rules.json')))
|
rules = json.load(codecs.open(path.join(data_dir, 'vocab', 'lemma_rules.json'), encoding='utf_8'))
|
||||||
else:
|
else:
|
||||||
rules = {}
|
rules = {}
|
||||||
return cls(index, exc, rules)
|
return cls(index, exc, rules)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user