Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 7 additions & 22 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,39 +2,24 @@ language: python

python:
- "2.6"
- "2.7.13"
- "2.7"
- "3.5"
- "3.6"

matrix:
allow_failures:
- python: "2.6"
- python: "3.5"
- python: "3.6"

before_install:
- export TZ=Europe/Brussels
- pip install --upgrade setuptools
- pip install --quiet pytest pytest-cov pytest-xdist
- pip install --upgrade pytest pytest-cov pytest-xdist

install:
- python setup.py install --quiet
- python setup.py install

script:
- pytest --cov

after_script:
- pip install --quiet coveralls
- coveralls

branches:
only:
- development
- python3
# after_script:
# - pip install coveralls
# - coveralls

notifications:
email: false

# You can connect to MySQL/MariaDB using the username "travis" or "root" and a blank password.
services:
- mysql
- email: false
2 changes: 1 addition & 1 deletion pattern/text/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -919,7 +919,7 @@ def parse(self, s, tokenize=True, tags=True, chunks=True, relations=False, lemma
s[i][j][0] = s[i][j][0].replace("/", "&slash;")
s[i][j] = "/".join(s[i][j])
s[i] = " ".join(s[i])
s = "\n".join(s)
s = u"\n".join(s)
s = TaggedString(s, format, language=kwargs.get("language", self.language))
return s

Expand Down
4 changes: 2 additions & 2 deletions pattern/text/en/wordnet/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
os.environ["WNHOME"] = os.path.join(MODULE, CORPUS)
os.environ["WNSEARCHDIR"] = os.path.join(MODULE, CORPUS, "dict")

from pywordnet import wordnet as wn
from pywordnet import wntools
from .pywordnet import wordnet as wn
from .pywordnet import wntools

# The bundled version of PyWordNet has custom fixes.
# - line 365: check if lexnames exist.
Expand Down
9 changes: 5 additions & 4 deletions pattern/text/en/wordnet/pywordnet/wntools.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
__author__ = "Oliver Steele <steele@osteele.com>"
__version__ = "2.0"

from wordnet import *
from .wordnet import *

#
# Domain utilities
Expand All @@ -41,9 +41,9 @@
def _requireSource(entity):
if not hasattr(entity, 'pointers'):
if isinstance(entity, Word):
raise TypeError(`entity` + " is not a Sense or Synset. Try " + `entity` + "[0] instead.")
raise TypeError(repr(entity) + " is not a Sense or Synset. Try " + repr(entity) + "[0] instead.")
else:
raise TypeError(`entity` + " is not a Sense or Synset")
raise TypeError(repr(entity) + " is not a Sense or Synset")

def tree(source, pointerType):
"""
Expand Down Expand Up @@ -337,7 +337,8 @@ def trySubstitutions(trySubstitutions, # workaround for lack of nested closures
# Testing
#
def _test(reset=0):
import doctest, wntools
import doctest
from . import wordnet
if reset:
doctest.master = None # This keeps doctest from complaining after a reload.
return doctest.testmod(wntools)
Loading