1 / 15

Natural Language Processing (NLP)

Natural Language Processing (NLP). Lecture No 2. Institute of Southern Punjab Multan Department of Computer Science. Language Processing. Level 1 – Speech sound (Phonetics & Phonology) Level 2 – Words & their forms (Morphology, Lexicon) Level 3 – Structure of sentences (Syntax, Parsing)

Download Presentation

Natural Language Processing (NLP)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Natural Language Processing (NLP) Lecture No 2 Institute of Southern Punjab Multan Department of Computer Science

  2. Language Processing • Level 1 – Speech sound (Phonetics & Phonology) • Level 2 – Words & their forms (Morphology, Lexicon) • Level 3 – Structure of sentences (Syntax, Parsing) • Level 4 – Meaning of sentences (Semantics) • Level 5 – Meaning in context & for a purpose (Pragmatics) • Level 6 – Connected sentence processing in a larger body of text (Discourse)

  3. Levels of Text Processing • Word Level • Words Properties • Stop-Words • Stemming • Frequent N-Grams • Thesaurus (WordNet) • Sentence Level • Document Level • Document-Collection Level • Linked-Document-Collection Level • Application Level

  4. Phonetic/Phonological Analysis OCR/Tokenization Morphological and lexical analysis Syntactic analysis Semantic Interpretation Discourse Processing Language Processing Pipeline speech text POS tagging WSD Shallow parsing Deep Parsing Anaphora resolution Integration

  5. Some Building Blocks Source Language Analysis Target Language Generation Text Normalization Text Rendering Morphological Analysis Morphological Synthesis POS Tagging Phrase Generation Parsing Role Ordering Semantic Analysis Lexical Choice Discourse Analysis Discourse Planning

  6. Stages in a Comprehensive NLP System • Tokenization • Morphological Analysis • Syntactic Analysis • Semantic Analysis (lexical and compositional) • Pragmatics and Discourse Analysis • Knowledge-Based Reasoning • Text generation

  7. Tokenization-Overview • Tokenization is the process of breaking up the given text into units called tokens. • The tokens may be words or number or punctuation mark. • Tokenization does this task by locating word boundaries. Ending point of a word and beginning of the next word is called word boundaries. • Tokenization is also known as word segmentation.

  8. Tokenizer • A tokenizer that divides a string into substrings by splitting on the specified string. • Whitespace Tokenizer • Whitespace And Punctuation Tokenizer • Classifier Based Tokenizer • Regex Tokenizer • Penn TreeBank Tokenizer

  9. Natural Language ToolKit (NLTK) & Python

  10. Python Programming language is Python Python is freely available for many platforms from the Python Software Foundation: – http://www.python.org/ – Named for the group Monty Python Characteristics of Python Easy-to-learn scripting language Similar in many aspects to Perl Object-oriented, with modules, classes, exceptions, high level dynamic data types Similar to Java Strongly typed, but without type declarations (dynamic typing) Regular Expressions and other string processing features

  11. Natural Language Toolkit (NLTK) • NL ToolKit provides libraries of many of the common NLP processes at various language levels • A suite of Python libraries for symbolic and statistical natural language programming • Developed at the University of Pennsylvania • http://www.nltk.org • NLTK provides: - • Basic classes for representing data relevant to Natural Language Processing. • Standard interfaces for performing NLP tasks such as tokenization, tagging and parsing • Standard implementation of each task which can be combined to solve complex problems

  12. NLTK Modules corpora: a package containing modules of example text tokenize: functions to separate text strings probability: for modeling frequency distributions and probabilistic systems stem – package of functions to stem words of text wordnet – interface to the WordNet lexical resource chunk – identify short non-nested phrases in text etree: for hierarchical structure over text tag: tagging each word with part-of-speech, sense, etc. parse: building trees over text - recursive descent, shift-reduce, probabilistic, etc. cluster: clustering algorithms draw: visualize NLP structures and processes contrib: various pieces of software from outside contributors

  13. Lab Session / Pracical Activity 1- Python and NLTK Download and Installation 2- Tokenization Demo in Python (Word Level Tokenization)

  14. Research TaskSearch and Download Papers RegardingText Classificationand readAbstract , Introduction, Literature Reviewto IdentifyProblem Statement, Proposed Solutionand Pre-Processing Steps used.

  15. END OF LECTURE

More Related