We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Tox fails with "ERROR: Failure: ImportError (No module named 'six')"
When I try to run the tests with Tox (on Ubuntu) from within a local clone of the repo, it manages to install the dependencies but blows up when trying to import things from within NLTK.

I imagine I can work around this by figuring out how to manually run just the tests I care about, but it's inconvenient.

I'm not sure whether I'm doing something dumb or whether the Tox setup is broken; if the former, the CONTRIBUTING docs should probably mention what needs to be done besides just running Tox; if the latter, it should probably be fixed.

Here's the full output (had to pastebin it due to GitHub's post length limit):

http://pastebin.com/ENuCLnv6


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `nltk/tokenize/api.py`
Content:
```
1 # Natural Language Toolkit: Tokenizer Interface
2 #
3 # Copyright (C) 2001-2015 NLTK Project
4 # Author: Edward Loper <edloper@gmail.com>
5 #         Steven Bird <stevenbird1@gmail.com>
6 # URL: <http://nltk.org/>
7 # For license information, see LICENSE.TXT
8 
9 """
10 Tokenizer Interface
11 """
12 
13 from abc import ABCMeta, abstractmethod
14 from six import add_metaclass
15 
16 from nltk.internals import overridden
17 from nltk.tokenize.util import string_span_tokenize
18 
19 @add_metaclass(ABCMeta)
20 class TokenizerI(object):
21     """
22     A processing interface for tokenizing a string.
23     Subclasses must define ``tokenize()`` or ``tokenize_sents()`` (or both).
24     """
25     @abstractmethod
26     def tokenize(self, s):
27         """
28         Return a tokenized copy of *s*.
29 
30         :rtype: list of str
31         """
32         if overridden(self.tokenize_sents):
33             return self.tokenize_sents([s])[0]
34 
35     def span_tokenize(self, s):
36         """
37         Identify the tokens using integer offsets ``(start_i, end_i)``,
38         where ``s[start_i:end_i]`` is the corresponding token.
39 
40         :rtype: iter(tuple(int, int))
41         """
42         raise NotImplementedError()
43 
44     def tokenize_sents(self, strings):
45         """
46         Apply ``self.tokenize()`` to each element of ``strings``.  I.e.:
47 
48             return [self.tokenize(s) for s in strings]
49 
50         :rtype: list(list(str))
51         """
52         return [self.tokenize(s) for s in strings]
53 
54     def span_tokenize_sents(self, strings):
55         """
56         Apply ``self.span_tokenize()`` to each element of ``strings``.  I.e.:
57 
58             return [self.span_tokenize(s) for s in strings]
59 
60         :rtype: iter(list(tuple(int, int)))
61         """
62         for s in strings:
63             yield list(self.span_tokenize(s))
64 
65 
66 class StringTokenizer(TokenizerI):
67     """A tokenizer that divides a string into substrings by splitting
68     on the specified string (defined in subclasses).
69     """
70 
71     def tokenize(self, s):
72         return s.split(self._string)
73 
74     def span_tokenize(self, s):
75         for span in string_span_tokenize(s, self._string):
76             yield span
77 
78 
79
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/nltk/tokenize/api.py b/nltk/tokenize/api.py
--- a/nltk/tokenize/api.py
+++ b/nltk/tokenize/api.py
@@ -11,7 +11,7 @@
 """
 
 from abc import ABCMeta, abstractmethod
-from six import add_metaclass
+from nltk.six import add_metaclass
 
 from nltk.internals import overridden
 from nltk.tokenize.util import string_span_tokenize

{"golden_diff": "diff --git a/nltk/tokenize/api.py b/nltk/tokenize/api.py\n--- a/nltk/tokenize/api.py\n+++ b/nltk/tokenize/api.py\n@@ -11,7 +11,7 @@\n \"\"\"\n \n from abc import ABCMeta, abstractmethod\n-from six import add_metaclass\n+from nltk.six import add_metaclass\n \n from nltk.internals import overridden\n from nltk.tokenize.util import string_span_tokenize\n", "issue": "Tox fails with \"ERROR: Failure: ImportError (No module named 'six')\"\nWhen I try to run the tests with Tox (on Ubuntu) from within a local clone of the repo, it manages to install the dependencies but blows up when trying to import things from within NLTK.\n\nI imagine I can work around this by figuring out how to manually run just the tests I care about, but it's inconvenient.\n\nI'm not sure whether I'm doing something dumb or whether the Tox setup is broken; if the former, the CONTRIBUTING docs should probably mention what needs to be done besides just running Tox; if the latter, it should probably be fixed.\n\nHere's the full output (had to pastebin it due to GitHub's post length limit):\n\nhttp://pastebin.com/ENuCLnv6\n\n", "before_files": [{"content": "# Natural Language Toolkit: Tokenizer Interface\n#\n# Copyright (C) 2001-2015 NLTK Project\n# Author: Edward Loper <edloper@gmail.com>\n#         Steven Bird <stevenbird1@gmail.com>\n# URL: <http://nltk.org/>\n# For license information, see LICENSE.TXT\n\n\"\"\"\nTokenizer Interface\n\"\"\"\n\nfrom abc import ABCMeta, abstractmethod\nfrom six import add_metaclass\n\nfrom nltk.internals import overridden\nfrom nltk.tokenize.util import string_span_tokenize\n\n@add_metaclass(ABCMeta)\nclass TokenizerI(object):\n    \"\"\"\n    A processing interface for tokenizing a string.\n    Subclasses must define ``tokenize()`` or ``tokenize_sents()`` (or both).\n    \"\"\"\n    @abstractmethod\n    def tokenize(self, s):\n        \"\"\"\n        Return a tokenized copy of *s*.\n\n        :rtype: list of str\n        \"\"\"\n        if overridden(self.tokenize_sents):\n            return self.tokenize_sents([s])[0]\n\n    def span_tokenize(self, s):\n        \"\"\"\n        Identify the tokens using integer offsets ``(start_i, end_i)``,\n        where ``s[start_i:end_i]`` is the corresponding token.\n\n        :rtype: iter(tuple(int, int))\n        \"\"\"\n        raise NotImplementedError()\n\n    def tokenize_sents(self, strings):\n        \"\"\"\n        Apply ``self.tokenize()`` to each element of ``strings``.  I.e.:\n\n            return [self.tokenize(s) for s in strings]\n\n        :rtype: list(list(str))\n        \"\"\"\n        return [self.tokenize(s) for s in strings]\n\n    def span_tokenize_sents(self, strings):\n        \"\"\"\n        Apply ``self.span_tokenize()`` to each element of ``strings``.  I.e.:\n\n            return [self.span_tokenize(s) for s in strings]\n\n        :rtype: iter(list(tuple(int, int)))\n        \"\"\"\n        for s in strings:\n            yield list(self.span_tokenize(s))\n\n\nclass StringTokenizer(TokenizerI):\n    \"\"\"A tokenizer that divides a string into substrings by splitting\n    on the specified string (defined in subclasses).\n    \"\"\"\n\n    def tokenize(self, s):\n        return s.split(self._string)\n\n    def span_tokenize(self, s):\n        for span in string_span_tokenize(s, self._string):\n            yield span\n\n\n", "path": "nltk/tokenize/api.py"}], "after_files": [{"content": "# Natural Language Toolkit: Tokenizer Interface\n#\n# Copyright (C) 2001-2015 NLTK Project\n# Author: Edward Loper <edloper@gmail.com>\n#         Steven Bird <stevenbird1@gmail.com>\n# URL: <http://nltk.org/>\n# For license information, see LICENSE.TXT\n\n\"\"\"\nTokenizer Interface\n\"\"\"\n\nfrom abc import ABCMeta, abstractmethod\nfrom nltk.six import add_metaclass\n\nfrom nltk.internals import overridden\nfrom nltk.tokenize.util import string_span_tokenize\n\n@add_metaclass(ABCMeta)\nclass TokenizerI(object):\n    \"\"\"\n    A processing interface for tokenizing a string.\n    Subclasses must define ``tokenize()`` or ``tokenize_sents()`` (or both).\n    \"\"\"\n    @abstractmethod\n    def tokenize(self, s):\n        \"\"\"\n        Return a tokenized copy of *s*.\n\n        :rtype: list of str\n        \"\"\"\n        if overridden(self.tokenize_sents):\n            return self.tokenize_sents([s])[0]\n\n    def span_tokenize(self, s):\n        \"\"\"\n        Identify the tokens using integer offsets ``(start_i, end_i)``,\n        where ``s[start_i:end_i]`` is the corresponding token.\n\n        :rtype: iter(tuple(int, int))\n        \"\"\"\n        raise NotImplementedError()\n\n    def tokenize_sents(self, strings):\n        \"\"\"\n        Apply ``self.tokenize()`` to each element of ``strings``.  I.e.:\n\n            return [self.tokenize(s) for s in strings]\n\n        :rtype: list(list(str))\n        \"\"\"\n        return [self.tokenize(s) for s in strings]\n\n    def span_tokenize_sents(self, strings):\n        \"\"\"\n        Apply ``self.span_tokenize()`` to each element of ``strings``.  I.e.:\n\n            return [self.span_tokenize(s) for s in strings]\n\n        :rtype: iter(list(tuple(int, int)))\n        \"\"\"\n        for s in strings:\n            yield list(self.span_tokenize(s))\n\n\nclass StringTokenizer(TokenizerI):\n    \"\"\"A tokenizer that divides a string into substrings by splitting\n    on the specified string (defined in subclasses).\n    \"\"\"\n\n    def tokenize(self, s):\n        return s.split(self._string)\n\n    def span_tokenize(self, s):\n        for span in string_span_tokenize(s, self._string):\n            yield span\n\n\n", "path": "nltk/tokenize/api.py"}]}