Giter Club home page Giter Club logo

nltk-tokenization's Introduction

nltk-tokenization

Natural Language Processing (NLP) is a subfield of computer science, artificial intelligence, information engineering, and human-computer interaction. This field focuses on how to program computers to process and analyze large amounts of natural language data. It is difficult to perform as the process of reading and understanding languages is far more complex than it seems at first glance. Tokenization is the process of tokenizing or splitting a string, text into a list of tokens. One can think of token as parts like a word is a token in a sentence, and a sentence is a token in a paragraph.

types of tokenization

1.Sentence Tokenization – Splitting sentences in the paragraph How sent_tokenize works ? The sent_tokenize function uses an instance of PunktSentenceTokenizer from the nltk.tokenize.punkt module, which is already been trained and thus very well knows to mark the end and beginning of sentence at what characters and punctuation.

2.PunktSentenceTokenizer – When we have huge chunks of data then it is efficient to use it.

3.Tokenize sentence of different language – One can also tokenize sentence from different languages using different pickle file other than English.

4.Word Tokenization – Splitting words in a sentence. How word_tokenize works? word_tokenize() function is a wrapper function that calls tokenize() on an instance of the TreebankWordTokenizer class.

5.Using TreebankWordTokenizer These tokenizers work by separating the words using punctuation and spaces. And as mentioned in the code outputs above, it does not discard the punctuation, allowing a user to decide what to do with the punctuations at the time of pre-processing.

6.WordPunctTokenizer – It seperates the punctuation from the words.

7.Using Regular Expression

8.Twitter-aware tokenizer, Is designed to be flexible and easy to adapt to new domains and tasks. Because there are many popular Twitter language and very colloquial things,I think it is vary useful for analyzing data from Twitter. And one of the most interesting features of TweetTokenizer is parameter of reduce_len parameters which is to replace repeated character sequences of length 3 or greater with sequences of length 3 and parameter of remove_handles which is to remove Twitter username handles from text.

9.SExprTokenizer It divides the string into tokens based on parenthesized expressions and whitespace. When there are non-matching parentheses there will be a „valueerror‟ exception. The “strict" argument can be set to False to allow for non-matching parentheses.

nltk-tokenization's People

Contributors

yashverma7 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.