Created
          October 26, 2011 13:41 
        
      - 
      
- 
        Save katylava/1316377 to your computer and use it in GitHub Desktop. 
    nltk spaceships
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | In [21]: texts = [text1, text2, text3, text4, text5, text6, text7, text8, text9] | |
| In [22]: for t in texts: | |
| ....: print "%d spaceship(s) in %s" % (t.count('spaceship'), t) | |
| ....: | |
| 0 spaceship(s) in <Text: Moby Dick by Herman Melville 1851> | |
| 0 spaceship(s) in <Text: Sense and Sensibility by Jane Austen 1811> | |
| 0 spaceship(s) in <Text: The Book of Genesis> | |
| 0 spaceship(s) in <Text: Inaugural Address Corpus> | |
| 0 spaceship(s) in <Text: Chat Corpus> | |
| 0 spaceship(s) in <Text: Monty Python and the Holy Grail> | |
| 0 spaceship(s) in <Text: Wall Street Journal> | |
| 0 spaceship(s) in <Text: Personals Corpus> | |
| 0 spaceship(s) in <Text: The Man Who Was Thursday by G . K . Chesterton 1908> | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment