prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <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
  
  
  </issue>
  <code>
  [start of nltk/tokenize/api.py]
  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 of nltk/tokenize/api.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: 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
  
verification_info: {"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"}]}