prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  WordNetLemmatizer in nltk.stem module
  What's the parameter of WordNetLemmatizer.lemmatize() in nltk.stem module?
  Turn to the document, what are the candidate value of the parameter **'pos'**?
  ![image](https://user-images.githubusercontent.com/62245023/134791412-1ff85ba5-5eb9-4859-a3f1-3b48bdd5a6fa.png)
  The default value is 'Noun'. But use the function pos_tag() to get the pos of the word, the value appears to come from several options.
  
  --- 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/stem/wordnet.py`
  Content:
  ```
  1 # Natural Language Toolkit: WordNet stemmer interface
  2 #
  3 # Copyright (C) 2001-2021 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 from nltk.corpus import wordnet
  10 from nltk.corpus.reader.wordnet import NOUN
  11 
  12 
  13 class WordNetLemmatizer:
  14     """
  15     WordNet Lemmatizer
  16 
  17     Lemmatize using WordNet's built-in morphy function.
  18     Returns the input word unchanged if it cannot be found in WordNet.
  19 
  20         >>> from nltk.stem import WordNetLemmatizer
  21         >>> wnl = WordNetLemmatizer()
  22         >>> print(wnl.lemmatize('dogs'))
  23         dog
  24         >>> print(wnl.lemmatize('churches'))
  25         church
  26         >>> print(wnl.lemmatize('aardwolves'))
  27         aardwolf
  28         >>> print(wnl.lemmatize('abaci'))
  29         abacus
  30         >>> print(wnl.lemmatize('hardrock'))
  31         hardrock
  32     """
  33 
  34     def __init__(self):
  35         pass
  36 
  37     def lemmatize(self, word, pos=NOUN):
  38         lemmas = wordnet._morphy(word, pos)
  39         return min(lemmas, key=len) if lemmas else word
  40 
  41     def __repr__(self):
  42         return "<WordNetLemmatizer>"
  43
  ```
  --- 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()
  
  ```
  
golden_diff: diff --git a/nltk/stem/wordnet.py b/nltk/stem/wordnet.py
  --- a/nltk/stem/wordnet.py
  +++ b/nltk/stem/wordnet.py
  @@ -6,8 +6,7 @@
   # URL: <http://nltk.org/>
   # For license information, see LICENSE.TXT
   
  -from nltk.corpus import wordnet
  -from nltk.corpus.reader.wordnet import NOUN
  +from nltk.corpus import wordnet as wn
   
   
   class WordNetLemmatizer:
  @@ -31,11 +30,19 @@
           hardrock
       """
   
  -    def __init__(self):
  -        pass
  -
  -    def lemmatize(self, word, pos=NOUN):
  -        lemmas = wordnet._morphy(word, pos)
  +    def lemmatize(self, word: str, pos: str = wn.NOUN) -> str:
  +        """Lemmatize `word` using WordNet's built-in morphy function.
  +        Returns the input word unchanged if it cannot be found in WordNet.
  +
  +        :param word: The input word to lemmatize.
  +        :type word: str
  +        :param pos: The Part Of Speech tag. Valid options are `"n"` for nouns,
  +            `"v"` for verbs, `"a"` for adjectives, `"r"` for adverbs and `"s"`
  +            for satellite adjectives.
  +        :param pos: str
  +        :return: The lemma of `word`, for the given `pos`.
  +        """
  +        lemmas = wn._morphy(word, pos)
           return min(lemmas, key=len) if lemmas else word
   
       def __repr__(self):
  
verification_info: {"golden_diff": "diff --git a/nltk/stem/wordnet.py b/nltk/stem/wordnet.py\n--- a/nltk/stem/wordnet.py\n+++ b/nltk/stem/wordnet.py\n@@ -6,8 +6,7 @@\n # URL: <http://nltk.org/>\n # For license information, see LICENSE.TXT\n \n-from nltk.corpus import wordnet\n-from nltk.corpus.reader.wordnet import NOUN\n+from nltk.corpus import wordnet as wn\n \n \n class WordNetLemmatizer:\n@@ -31,11 +30,19 @@\n         hardrock\n     \"\"\"\n \n-    def __init__(self):\n-        pass\n-\n-    def lemmatize(self, word, pos=NOUN):\n-        lemmas = wordnet._morphy(word, pos)\n+    def lemmatize(self, word: str, pos: str = wn.NOUN) -> str:\n+        \"\"\"Lemmatize `word` using WordNet's built-in morphy function.\n+        Returns the input word unchanged if it cannot be found in WordNet.\n+\n+        :param word: The input word to lemmatize.\n+        :type word: str\n+        :param pos: The Part Of Speech tag. Valid options are `\"n\"` for nouns,\n+            `\"v\"` for verbs, `\"a\"` for adjectives, `\"r\"` for adverbs and `\"s\"`\n+            for satellite adjectives.\n+        :param pos: str\n+        :return: The lemma of `word`, for the given `pos`.\n+        \"\"\"\n+        lemmas = wn._morphy(word, pos)\n         return min(lemmas, key=len) if lemmas else word\n \n     def __repr__(self):\n", "issue": "WordNetLemmatizer in nltk.stem module\nWhat's the parameter of WordNetLemmatizer.lemmatize() in nltk.stem module?\r\nTurn to the document, what are the candidate value of the parameter **'pos'**?\r\n![image](https://user-images.githubusercontent.com/62245023/134791412-1ff85ba5-5eb9-4859-a3f1-3b48bdd5a6fa.png)\r\nThe default value is 'Noun'. But use the function pos_tag() to get the pos of the word, the value appears to come from several options.\n", "before_files": [{"content": "# Natural Language Toolkit: WordNet stemmer interface\n#\n# Copyright (C) 2001-2021 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\nfrom nltk.corpus import wordnet\nfrom nltk.corpus.reader.wordnet import NOUN\n\n\nclass WordNetLemmatizer:\n    \"\"\"\n    WordNet Lemmatizer\n\n    Lemmatize using WordNet's built-in morphy function.\n    Returns the input word unchanged if it cannot be found in WordNet.\n\n        >>> from nltk.stem import WordNetLemmatizer\n        >>> wnl = WordNetLemmatizer()\n        >>> print(wnl.lemmatize('dogs'))\n        dog\n        >>> print(wnl.lemmatize('churches'))\n        church\n        >>> print(wnl.lemmatize('aardwolves'))\n        aardwolf\n        >>> print(wnl.lemmatize('abaci'))\n        abacus\n        >>> print(wnl.lemmatize('hardrock'))\n        hardrock\n    \"\"\"\n\n    def __init__(self):\n        pass\n\n    def lemmatize(self, word, pos=NOUN):\n        lemmas = wordnet._morphy(word, pos)\n        return min(lemmas, key=len) if lemmas else word\n\n    def __repr__(self):\n        return \"<WordNetLemmatizer>\"\n", "path": "nltk/stem/wordnet.py"}], "after_files": [{"content": "# Natural Language Toolkit: WordNet stemmer interface\n#\n# Copyright (C) 2001-2021 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\nfrom nltk.corpus import wordnet as wn\n\n\nclass WordNetLemmatizer:\n    \"\"\"\n    WordNet Lemmatizer\n\n    Lemmatize using WordNet's built-in morphy function.\n    Returns the input word unchanged if it cannot be found in WordNet.\n\n        >>> from nltk.stem import WordNetLemmatizer\n        >>> wnl = WordNetLemmatizer()\n        >>> print(wnl.lemmatize('dogs'))\n        dog\n        >>> print(wnl.lemmatize('churches'))\n        church\n        >>> print(wnl.lemmatize('aardwolves'))\n        aardwolf\n        >>> print(wnl.lemmatize('abaci'))\n        abacus\n        >>> print(wnl.lemmatize('hardrock'))\n        hardrock\n    \"\"\"\n\n    def lemmatize(self, word: str, pos: str = wn.NOUN) -> str:\n        \"\"\"Lemmatize `word` using WordNet's built-in morphy function.\n        Returns the input word unchanged if it cannot be found in WordNet.\n\n        :param word: The input word to lemmatize.\n        :type word: str\n        :param pos: The Part Of Speech tag. Valid options are `\"n\"` for nouns,\n            `\"v\"` for verbs, `\"a\"` for adjectives, `\"r\"` for adverbs and `\"s\"`\n            for satellite adjectives.\n        :param pos: str\n        :return: The lemma of `word`, for the given `pos`.\n        \"\"\"\n        lemmas = wn._morphy(word, pos)\n        return min(lemmas, key=len) if lemmas else word\n\n    def __repr__(self):\n        return \"<WordNetLemmatizer>\"\n", "path": "nltk/stem/wordnet.py"}]}