We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Remove prob_parse from ParserI
The ParserI methods `prob_parse` and `prob_parse_sents` are not used anywhere, and are not defined anywhere, so I propose to remove them from `nltk/parse/api.py`


--- 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/parse/api.py`
Content:
```
1 # Natural Language Toolkit: Parser API
2 #
3 # Copyright (C) 2001-2014 NLTK Project
4 # Author: Steven Bird <stevenbird1@gmail.com>
5 #         Edward Loper <edloper@gmail.com>
6 # URL: <http://nltk.org/>
7 # For license information, see LICENSE.TXT
8 #
9 
10 import itertools
11 
12 from nltk.internals import overridden
13 
14 class ParserI(object):
15     """
16     A processing class for deriving trees that represent possible
17     structures for a sequence of tokens.  These tree structures are
18     known as "parses".  Typically, parsers are used to derive syntax
19     trees for sentences.  But parsers can also be used to derive other
20     kinds of tree structure, such as morphological trees and discourse
21     structures.
22 
23     Subclasses must define:
24       - at least one of: ``parse()``, ``nbest_parse()``, ``iter_parse()``,
25         ``parse_sents()``, ``nbest_parse_sents()``, ``iter_parse_sents()``.
26 
27     Subclasses may define:
28       - ``grammar()``
29       - either ``prob_parse()`` or ``prob_parse_sents()`` (or both)
30     """
31     def grammar(self):
32         """
33         :return: The grammar used by this parser.
34         """
35         raise NotImplementedError()
36 
37     def parse(self, sent):
38         """
39         :return: A parse tree that represents the structure of the
40         given sentence, or None if no parse tree is found.  If
41         multiple parses are found, then return the best parse.
42 
43         :param sent: The sentence to be parsed
44         :type sent: list(str)
45         :rtype: Tree
46         """
47         if overridden(self.parse_sents):
48             return self.parse_sents([sent])[0]
49         else:
50             trees = self.nbest_parse(sent, 1)
51             if trees: return trees[0]
52             else: return None
53 
54     def nbest_parse(self, sent, n=None):
55         """
56         :return: A list of parse trees that represent possible
57         structures for the given sentence.  When possible, this list is
58         sorted from most likely to least likely.  If ``n`` is
59         specified, then the returned list will contain at most ``n``
60         parse trees.
61 
62         :param sent: The sentence to be parsed
63         :type sent: list(str)
64         :param n: The maximum number of trees to return.
65         :type n: int
66         :rtype: list(Tree)
67         """
68         if overridden(self.nbest_parse_sents):
69             return self.nbest_parse_sents([sent],n)[0]
70         elif overridden(self.parse) or overridden(self.parse_sents):
71             tree = self.parse(sent)
72             if tree: return [tree]
73             else: return []
74         else:
75             return list(itertools.islice(self.iter_parse(sent), n))
76 
77     def iter_parse(self, sent):
78         """
79         :return: An iterator that generates parse trees that represent
80         possible structures for the given sentence.  When possible,
81         this list is sorted from most likely to least likely.
82 
83         :param sent: The sentence to be parsed
84         :type sent: list(str)
85         :rtype: iter(Tree)
86         """
87         if overridden(self.iter_parse_sents):
88             return self.iter_parse_sents([sent])[0]
89         elif overridden(self.nbest_parse) or overridden(self.nbest_parse_sents):
90             return iter(self.nbest_parse(sent))
91         elif overridden(self.parse) or overridden(self.parse_sents):
92             tree = self.parse(sent)
93             if tree: return iter([tree])
94             else: return iter([])
95         else:
96             raise NotImplementedError()
97 
98     def prob_parse(self, sent):
99         """
100         :return: A probability distribution over the possible parse
101         trees for the given sentence.  If there are no possible parse
102         trees for the given sentence, return a probability distribution
103         that assigns a probability of 1.0 to None.
104 
105         :param sent: The sentence to be parsed
106         :type sent: list(str)
107         :rtype: ProbDistI(Tree)
108         """
109         if overridden(self.prob_parse_sents):
110             return self.prob_parse_sents([sent])[0]
111         else:
112             raise NotImplementedError
113 
114     def parse_sents(self, sents):
115         """
116         Apply ``self.parse()`` to each element of ``sents``.  I.e.:
117 
118             return [self.parse(sent) for sent in sents]
119 
120         :rtype: list(Tree)
121         """
122         return [self.parse(sent) for sent in sents]
123 
124     def nbest_parse_sents(self, sents, n=None):
125         """
126         Apply ``self.nbest_parse()`` to each element of ``sents``.  I.e.:
127 
128             return [self.nbest_parse(sent, n) for sent in sents]
129 
130         :rtype: list(list(Tree))
131         """
132         return [self.nbest_parse(sent,n ) for sent in sents]
133 
134     def iter_parse_sents(self, sents):
135         """
136         Apply ``self.iter_parse()`` to each element of ``sents``.  I.e.:
137 
138             return [self.iter_parse(sent) for sent in sents]
139 
140         :rtype: list(iter(Tree))
141         """
142         return [self.iter_parse(sent) for sent in sents]
143 
144     def prob_parse_sents(self, sents):
145         """
146         Apply ``self.prob_parse()`` to each element of ``sents``.  I.e.:
147 
148             return [self.prob_parse(sent) for sent in sents]
149 
150         :rtype: list(ProbDistI(Tree))
151         """
152         return [self.prob_parse(sent) for sent in sents]
153 
154
```
--- 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/parse/api.py b/nltk/parse/api.py
--- a/nltk/parse/api.py
+++ b/nltk/parse/api.py
@@ -26,7 +26,6 @@
 
     Subclasses may define:
       - ``grammar()``
-      - either ``prob_parse()`` or ``prob_parse_sents()`` (or both)
     """
     def grammar(self):
         """
@@ -95,22 +94,6 @@
         else:
             raise NotImplementedError()
 
-    def prob_parse(self, sent):
-        """
-        :return: A probability distribution over the possible parse
-        trees for the given sentence.  If there are no possible parse
-        trees for the given sentence, return a probability distribution
-        that assigns a probability of 1.0 to None.
-
-        :param sent: The sentence to be parsed
-        :type sent: list(str)
-        :rtype: ProbDistI(Tree)
-        """
-        if overridden(self.prob_parse_sents):
-            return self.prob_parse_sents([sent])[0]
-        else:
-            raise NotImplementedError
-
     def parse_sents(self, sents):
         """
         Apply ``self.parse()`` to each element of ``sents``.  I.e.:
@@ -141,13 +124,3 @@
         """
         return [self.iter_parse(sent) for sent in sents]
 
-    def prob_parse_sents(self, sents):
-        """
-        Apply ``self.prob_parse()`` to each element of ``sents``.  I.e.:
-
-            return [self.prob_parse(sent) for sent in sents]
-
-        :rtype: list(ProbDistI(Tree))
-        """
-        return [self.prob_parse(sent) for sent in sents]
-

{"golden_diff": "diff --git a/nltk/parse/api.py b/nltk/parse/api.py\n--- a/nltk/parse/api.py\n+++ b/nltk/parse/api.py\n@@ -26,7 +26,6 @@\n \n     Subclasses may define:\n       - ``grammar()``\n-      - either ``prob_parse()`` or ``prob_parse_sents()`` (or both)\n     \"\"\"\n     def grammar(self):\n         \"\"\"\n@@ -95,22 +94,6 @@\n         else:\n             raise NotImplementedError()\n \n-    def prob_parse(self, sent):\n-        \"\"\"\n-        :return: A probability distribution over the possible parse\n-        trees for the given sentence.  If there are no possible parse\n-        trees for the given sentence, return a probability distribution\n-        that assigns a probability of 1.0 to None.\n-\n-        :param sent: The sentence to be parsed\n-        :type sent: list(str)\n-        :rtype: ProbDistI(Tree)\n-        \"\"\"\n-        if overridden(self.prob_parse_sents):\n-            return self.prob_parse_sents([sent])[0]\n-        else:\n-            raise NotImplementedError\n-\n     def parse_sents(self, sents):\n         \"\"\"\n         Apply ``self.parse()`` to each element of ``sents``.  I.e.:\n@@ -141,13 +124,3 @@\n         \"\"\"\n         return [self.iter_parse(sent) for sent in sents]\n \n-    def prob_parse_sents(self, sents):\n-        \"\"\"\n-        Apply ``self.prob_parse()`` to each element of ``sents``.  I.e.:\n-\n-            return [self.prob_parse(sent) for sent in sents]\n-\n-        :rtype: list(ProbDistI(Tree))\n-        \"\"\"\n-        return [self.prob_parse(sent) for sent in sents]\n-\n", "issue": "Remove prob_parse from ParserI\nThe ParserI methods `prob_parse` and `prob_parse_sents` are not used anywhere, and are not defined anywhere, so I propose to remove them from `nltk/parse/api.py`\n\n", "before_files": [{"content": "# Natural Language Toolkit: Parser API\n#\n# Copyright (C) 2001-2014 NLTK Project\n# Author: Steven Bird <stevenbird1@gmail.com>\n#         Edward Loper <edloper@gmail.com>\n# URL: <http://nltk.org/>\n# For license information, see LICENSE.TXT\n#\n\nimport itertools\n\nfrom nltk.internals import overridden\n\nclass ParserI(object):\n    \"\"\"\n    A processing class for deriving trees that represent possible\n    structures for a sequence of tokens.  These tree structures are\n    known as \"parses\".  Typically, parsers are used to derive syntax\n    trees for sentences.  But parsers can also be used to derive other\n    kinds of tree structure, such as morphological trees and discourse\n    structures.\n\n    Subclasses must define:\n      - at least one of: ``parse()``, ``nbest_parse()``, ``iter_parse()``,\n        ``parse_sents()``, ``nbest_parse_sents()``, ``iter_parse_sents()``.\n\n    Subclasses may define:\n      - ``grammar()``\n      - either ``prob_parse()`` or ``prob_parse_sents()`` (or both)\n    \"\"\"\n    def grammar(self):\n        \"\"\"\n        :return: The grammar used by this parser.\n        \"\"\"\n        raise NotImplementedError()\n\n    def parse(self, sent):\n        \"\"\"\n        :return: A parse tree that represents the structure of the\n        given sentence, or None if no parse tree is found.  If\n        multiple parses are found, then return the best parse.\n\n        :param sent: The sentence to be parsed\n        :type sent: list(str)\n        :rtype: Tree\n        \"\"\"\n        if overridden(self.parse_sents):\n            return self.parse_sents([sent])[0]\n        else:\n            trees = self.nbest_parse(sent, 1)\n            if trees: return trees[0]\n            else: return None\n\n    def nbest_parse(self, sent, n=None):\n        \"\"\"\n        :return: A list of parse trees that represent possible\n        structures for the given sentence.  When possible, this list is\n        sorted from most likely to least likely.  If ``n`` is\n        specified, then the returned list will contain at most ``n``\n        parse trees.\n\n        :param sent: The sentence to be parsed\n        :type sent: list(str)\n        :param n: The maximum number of trees to return.\n        :type n: int\n        :rtype: list(Tree)\n        \"\"\"\n        if overridden(self.nbest_parse_sents):\n            return self.nbest_parse_sents([sent],n)[0]\n        elif overridden(self.parse) or overridden(self.parse_sents):\n            tree = self.parse(sent)\n            if tree: return [tree]\n            else: return []\n        else:\n            return list(itertools.islice(self.iter_parse(sent), n))\n\n    def iter_parse(self, sent):\n        \"\"\"\n        :return: An iterator that generates parse trees that represent\n        possible structures for the given sentence.  When possible,\n        this list is sorted from most likely to least likely.\n\n        :param sent: The sentence to be parsed\n        :type sent: list(str)\n        :rtype: iter(Tree)\n        \"\"\"\n        if overridden(self.iter_parse_sents):\n            return self.iter_parse_sents([sent])[0]\n        elif overridden(self.nbest_parse) or overridden(self.nbest_parse_sents):\n            return iter(self.nbest_parse(sent))\n        elif overridden(self.parse) or overridden(self.parse_sents):\n            tree = self.parse(sent)\n            if tree: return iter([tree])\n            else: return iter([])\n        else:\n            raise NotImplementedError()\n\n    def prob_parse(self, sent):\n        \"\"\"\n        :return: A probability distribution over the possible parse\n        trees for the given sentence.  If there are no possible parse\n        trees for the given sentence, return a probability distribution\n        that assigns a probability of 1.0 to None.\n\n        :param sent: The sentence to be parsed\n        :type sent: list(str)\n        :rtype: ProbDistI(Tree)\n        \"\"\"\n        if overridden(self.prob_parse_sents):\n            return self.prob_parse_sents([sent])[0]\n        else:\n            raise NotImplementedError\n\n    def parse_sents(self, sents):\n        \"\"\"\n        Apply ``self.parse()`` to each element of ``sents``.  I.e.:\n\n            return [self.parse(sent) for sent in sents]\n\n        :rtype: list(Tree)\n        \"\"\"\n        return [self.parse(sent) for sent in sents]\n\n    def nbest_parse_sents(self, sents, n=None):\n        \"\"\"\n        Apply ``self.nbest_parse()`` to each element of ``sents``.  I.e.:\n\n            return [self.nbest_parse(sent, n) for sent in sents]\n\n        :rtype: list(list(Tree))\n        \"\"\"\n        return [self.nbest_parse(sent,n ) for sent in sents]\n\n    def iter_parse_sents(self, sents):\n        \"\"\"\n        Apply ``self.iter_parse()`` to each element of ``sents``.  I.e.:\n\n            return [self.iter_parse(sent) for sent in sents]\n\n        :rtype: list(iter(Tree))\n        \"\"\"\n        return [self.iter_parse(sent) for sent in sents]\n\n    def prob_parse_sents(self, sents):\n        \"\"\"\n        Apply ``self.prob_parse()`` to each element of ``sents``.  I.e.:\n\n            return [self.prob_parse(sent) for sent in sents]\n\n        :rtype: list(ProbDistI(Tree))\n        \"\"\"\n        return [self.prob_parse(sent) for sent in sents]\n\n", "path": "nltk/parse/api.py"}], "after_files": [{"content": "# Natural Language Toolkit: Parser API\n#\n# Copyright (C) 2001-2014 NLTK Project\n# Author: Steven Bird <stevenbird1@gmail.com>\n#         Edward Loper <edloper@gmail.com>\n# URL: <http://nltk.org/>\n# For license information, see LICENSE.TXT\n#\n\nimport itertools\n\nfrom nltk.internals import overridden\n\nclass ParserI(object):\n    \"\"\"\n    A processing class for deriving trees that represent possible\n    structures for a sequence of tokens.  These tree structures are\n    known as \"parses\".  Typically, parsers are used to derive syntax\n    trees for sentences.  But parsers can also be used to derive other\n    kinds of tree structure, such as morphological trees and discourse\n    structures.\n\n    Subclasses must define:\n      - at least one of: ``parse()``, ``nbest_parse()``, ``iter_parse()``,\n        ``parse_sents()``, ``nbest_parse_sents()``, ``iter_parse_sents()``.\n\n    Subclasses may define:\n      - ``grammar()``\n    \"\"\"\n    def grammar(self):\n        \"\"\"\n        :return: The grammar used by this parser.\n        \"\"\"\n        raise NotImplementedError()\n\n    def parse(self, sent):\n        \"\"\"\n        :return: A parse tree that represents the structure of the\n        given sentence, or None if no parse tree is found.  If\n        multiple parses are found, then return the best parse.\n\n        :param sent: The sentence to be parsed\n        :type sent: list(str)\n        :rtype: Tree\n        \"\"\"\n        if overridden(self.parse_sents):\n            return self.parse_sents([sent])[0]\n        else:\n            trees = self.nbest_parse(sent, 1)\n            if trees: return trees[0]\n            else: return None\n\n    def nbest_parse(self, sent, n=None):\n        \"\"\"\n        :return: A list of parse trees that represent possible\n        structures for the given sentence.  When possible, this list is\n        sorted from most likely to least likely.  If ``n`` is\n        specified, then the returned list will contain at most ``n``\n        parse trees.\n\n        :param sent: The sentence to be parsed\n        :type sent: list(str)\n        :param n: The maximum number of trees to return.\n        :type n: int\n        :rtype: list(Tree)\n        \"\"\"\n        if overridden(self.nbest_parse_sents):\n            return self.nbest_parse_sents([sent],n)[0]\n        elif overridden(self.parse) or overridden(self.parse_sents):\n            tree = self.parse(sent)\n            if tree: return [tree]\n            else: return []\n        else:\n            return list(itertools.islice(self.iter_parse(sent), n))\n\n    def iter_parse(self, sent):\n        \"\"\"\n        :return: An iterator that generates parse trees that represent\n        possible structures for the given sentence.  When possible,\n        this list is sorted from most likely to least likely.\n\n        :param sent: The sentence to be parsed\n        :type sent: list(str)\n        :rtype: iter(Tree)\n        \"\"\"\n        if overridden(self.iter_parse_sents):\n            return self.iter_parse_sents([sent])[0]\n        elif overridden(self.nbest_parse) or overridden(self.nbest_parse_sents):\n            return iter(self.nbest_parse(sent))\n        elif overridden(self.parse) or overridden(self.parse_sents):\n            tree = self.parse(sent)\n            if tree: return iter([tree])\n            else: return iter([])\n        else:\n            raise NotImplementedError()\n\n    def parse_sents(self, sents):\n        \"\"\"\n        Apply ``self.parse()`` to each element of ``sents``.  I.e.:\n\n            return [self.parse(sent) for sent in sents]\n\n        :rtype: list(Tree)\n        \"\"\"\n        return [self.parse(sent) for sent in sents]\n\n    def nbest_parse_sents(self, sents, n=None):\n        \"\"\"\n        Apply ``self.nbest_parse()`` to each element of ``sents``.  I.e.:\n\n            return [self.nbest_parse(sent, n) for sent in sents]\n\n        :rtype: list(list(Tree))\n        \"\"\"\n        return [self.nbest_parse(sent,n ) for sent in sents]\n\n    def iter_parse_sents(self, sents):\n        \"\"\"\n        Apply ``self.iter_parse()`` to each element of ``sents``.  I.e.:\n\n            return [self.iter_parse(sent) for sent in sents]\n\n        :rtype: list(iter(Tree))\n        \"\"\"\n        return [self.iter_parse(sent) for sent in sents]\n\n", "path": "nltk/parse/api.py"}]}