The Road to Mathematics (machine Learning Practice Guide)-Text mining with NLP (4)

Source: Internet
Author: User
Tags nltk
Sample=cutstring (U) It is learnt that the car is nicknamed the Beast and the Beast is likely to be used in January 2017 when the 45th President of the United States took office. At present, the detailed specifications of the beast are classified information, but spy photos show the Beast adopted the Cadillac's latest grille and headlight design. ") tokenstr=nltk.word_tokenize (sample) FDIST3=NLTK. Freqdist (tokenstr) print "---the number of U.S. occurrences---" Print fdist3[u "us"]print "---sample total---" Print fdist3. N () print "---the largest number of samples---" Print fdist3.max () #频率分布表fdist3. tabulate () #频率分布图fdist3. Plot () #累积频率分布图fdist3. Plot (10, Cumulative=true)

This blog all content is original, if reprint please indicate source http://blog.csdn.net/myhaspl/

The Road to Mathematics (machine Learning Practice Guide)-Text mining with NLP (4)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.