Textstat, не выполняющий функции

Я просто нашел ссылку на то, как установить textstat на моем неактивном Python, и я был успешен в том, чтобы заставлять это работать. Однако, когда я импортирую textstat, все кажется прекрасным, пока я не пытаюсь выполнить функцию. Это продолжает говорить мне, что они не определяются функции. Я могу войти в textstat папку на своем компьютере, посмотреть на код и видеть, что они определяются в рамках кода. Что я делаю неправильно?

Python 2.7.8 (default, Jul 13 2014, 17:11:32) 
[GCC 4.2.1 Compatible Apple LLVM 5.1 (clang-503.0.40)] on darwin
Type "copyright", "credits" or "license()" for more information.
>>> import textstat
>>> import nltk
>>> from nltk.book import
SyntaxError: invalid syntax
>>> from nltk.book import*
*** Introductory Examples for the NLTK Book ***
Loading text1, ..., text9 and sent1, ..., sent9
Type the name of the text or sentence to view it.
Type: 'texts()' or 'sents()' to list the materials.
text1: Moby Dick by Herman Melville 1851
text2: Sense and Sensibility by Jane Austen 1811
text3: The Book of Genesis
text4: Inaugural Address Corpus
text5: Chat Corpus
text6: Monty Python and the Holy Grail
text7: Wall Street Journal
text8: Personals Corpus
text9: The Man Who Was Thursday by G . K . Chesterton 1908
>>> flesch_reading_ease(text1)

Traceback (most recent call last):
  File "<pyshell#4>", line 1, in <module>
    flesch_reading_ease(text1)
NameError: name 'flesch_reading_ease' is not defined
>>> 
1
задан 22 November 2014 в 15:23

0 ответов

Другие вопросы по тегам:

Похожие вопросы: