Download presentation
Presentation is loading. Please wait.
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
Language Processing Pipeline
speech text Phonetic/Phonological Analysis OCR/Tokenization POS tagging Morphological and lexical analysis WSD Shallow parsing Syntactic analysis Deep Parsing Semantic Interpretation Anaphora resolution Discourse Processing 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: – – 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 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 Task Search and Download Papers Regarding Text Classification and read Abstract , Introduction, Literature Review to Identify Problem Statement, Proposed Solution and Pre-Processing Steps used.
15
END OF LECTURE
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.