SlideShare a Scribd company logo
1 of 25
Download to read offline
Tech Talk

NLP Tools in iOS/OSX
Todd Kramer
NLP Tools in iOS/OSX: Topics
• CFStringTransform
• transliteration, normalization
• CFStringTokenizer
• string tokenization, language identification
• UITextChecker
• spell check
• NSLinguisticTagger
• parts of speech tagging, named entity recognition,
lemmatization, language/script identification
• NSDataDetector
• data detection
NLP Tools in iOS/OSX: CFStringTransform
The CFStringTransform Function
NLP Tools in iOS/OSX: CFStringTransform
Transliterate Thai to Latin
Original: สวัสดี; Transformed: s̄wạs̄dī
NLP Tools in iOS/OSX: CFStringTransform
NLP Tools in iOS/OSX: CFStringTransform
Transliterate Latin to Gujarati
Original: Gujarātī; Transformed: ગuજરાતી
NLP Tools in iOS/OSX: CFStringTransform
Remove Diacritics and Accents
Original: s̄wạs̄dī; Transformed: swasdi
NLP Tools in iOS/OSX: CFStringTransform
Describe Unicode Characters
Original: 👍; Transformed: N{THUMBS UP SIGN}


CFStringTokenizer
NLP Tools in iOS/OSX: CFStringTokenizer
Tokenize Into Words: Simplified Chinese
Tokens: [⼈人, ⼈人⽣生, ⽽而, ⾃自由, 在, 尊严, 和, 权利, 上, ⼀一律, 平等, 他们,
赋有, 理性, 和, 良⼼心, 并, 应, 以, 兄弟, 关系, 的, 精神, 互相, 对待]
NLP Tools in iOS/OSX: CFStringTokenizer
Transliterate Tokens: Simplified Chinese
Tokens: [rén, rénshēng, ér, zìyóu, zài, zūnyán, hé, quánlì, shàng, yīlv̀, píngděng, tāmén,
fùyǒu, lǐxìng, hé, liángxīn, bìng, yìng, yǐ, xiōngdì, guānxī, de, jīngshén, hùxiāng, duìdài]
NLP Tools in iOS/OSX: CFStringTokenizer
Language Identification: Icelandic
Language Code: is


UITextChecker
NLP Tools in iOS/OSX: UITextChecker
NLP Tools in iOS/OSX: UITextChecker
Spell Check
Misspelled Range: (7,4); Guesses: Optional([ice,
Bice, bide, nice, vice, bike, bile, bite, bace, bbce,
bcce, bdce, bece, bfce, dice, lice, mice, pice, rice,
brice, bicep])
Misspelled Range: (12,3); Guesses: Optional([ay, cay,
day, say])


NSLinguisticTagger
NLP Tools in iOS/OSX: NSLinguisticTagger
Parts of Speech Tagging and Named Entity
Recognition
NLP Tools in iOS/OSX: NSLinguisticTagger
NSLinguisticTagger Schemes
NLP Tools in iOS/OSX: NSLinguisticTagger
Parts of Speech Tagging and Named Entity
Recognition
NLP Tools in iOS/OSX: NSLinguisticTagger
Parts of Speech Tagging and Named Entity
Recognition
Token: What; Tag: Pronoun
Token: is; Tag: Verb
Token: the; Tag: Determiner
Token: capital; Tag: Noun
Token: of; Tag: Preposition
Token: New York; Tag: PlaceName
NLP Tools in iOS/OSX: NSLinguisticTagger
Script Identification
NLP Tools in iOS/OSX: NSLinguisticTagger
Script Identification
Token: hello; Tag: Latn
Token: สวัสดี; Tag: Thai
Token: bonjour; Tag: Latn
Token: 你; Tag: Hani
Token: 好; Tag: Hani
Token: !લો; Tag: Gujr
Token: привет; Tag: Cyrl
Token: नमस्ते; Tag: Deva


NSDataDetector
NLP Tools in iOS/OSX: NSDataDetector
Extracting Structured Data
Match: Lunch tomorrow at 12:30PM;
- Date: Optional(2014-11-20 20:30:00 +0000)
Match: 1600 Pennsylvania Ave. NW, Washington, D.C.
20500;
- Street: Optional(1600 Pennsylvania Ave.);
- Zip: Optional(20500)
Match: 202-456-1414
Match: 2:15PM;
- Date: Optional(2014-11-19 22:15:00 +0000)
Match: Southwest Airlines Flight 737
Match: www.southwest.com
NLP Tools in iOS/OSX: NSDataDetector
Extracting Structured Data

More Related Content

What's hot (6)

DDD/CQRS - I must learn to repeat myself
DDD/CQRS - I must learn to repeat myselfDDD/CQRS - I must learn to repeat myself
DDD/CQRS - I must learn to repeat myself
 
NLTK
NLTKNLTK
NLTK
 
C datatypes
C datatypesC datatypes
C datatypes
 
Introduction of tango! (en)
Introduction of tango! (en)Introduction of tango! (en)
Introduction of tango! (en)
 
Nltk
NltkNltk
Nltk
 
Natural Language Processing in Ruby
Natural Language Processing in RubyNatural Language Processing in Ruby
Natural Language Processing in Ruby
 

Similar to Natural language processing in iOS / OSX

Natural Language Processing made easy
Natural Language Processing made easyNatural Language Processing made easy
Natural Language Processing made easy
Gopi Krishnan Nambiar
 
Day2-Slides.ppt pppppppppppppppppppppppppp
Day2-Slides.ppt ppppppppppppppppppppppppppDay2-Slides.ppt pppppppppppppppppppppppppp
Day2-Slides.ppt pppppppppppppppppppppppppp
ratnapatil14
 

Similar to Natural language processing in iOS / OSX (20)

JavaScript Speech Recognition
JavaScript Speech RecognitionJavaScript Speech Recognition
JavaScript Speech Recognition
 
From Programming to Modeling And Back Again
From Programming to Modeling And Back AgainFrom Programming to Modeling And Back Again
From Programming to Modeling And Back Again
 
Pycon India 2018 Natural Language Processing Workshop
Pycon India 2018   Natural Language Processing WorkshopPycon India 2018   Natural Language Processing Workshop
Pycon India 2018 Natural Language Processing Workshop
 
Sslis
SslisSslis
Sslis
 
NLTK: Natural Language Processing made easy
NLTK: Natural Language Processing made easyNLTK: Natural Language Processing made easy
NLTK: Natural Language Processing made easy
 
Natural Language Processing made easy
Natural Language Processing made easyNatural Language Processing made easy
Natural Language Processing made easy
 
Natural Language Processing using Text Mining
Natural Language Processing using Text MiningNatural Language Processing using Text Mining
Natural Language Processing using Text Mining
 
Natural language processing (Python)
Natural language processing (Python)Natural language processing (Python)
Natural language processing (Python)
 
Day2-Slides.ppt pppppppppppppppppppppppppp
Day2-Slides.ppt ppppppppppppppppppppppppppDay2-Slides.ppt pppppppppppppppppppppppppp
Day2-Slides.ppt pppppppppppppppppppppppppp
 
Goodparts
GoodpartsGoodparts
Goodparts
 
HANDLING UNKNOWN WORDS IN NAMED ENTITY RECOGNITION USING TRANSLITERATION
HANDLING UNKNOWN WORDS IN NAMED ENTITY RECOGNITION USING TRANSLITERATIONHANDLING UNKNOWN WORDS IN NAMED ENTITY RECOGNITION USING TRANSLITERATION
HANDLING UNKNOWN WORDS IN NAMED ENTITY RECOGNITION USING TRANSLITERATION
 
Computers have feelings too
Computers have feelings tooComputers have feelings too
Computers have feelings too
 
Big data
Big dataBig data
Big data
 
Александр Ломов: "Reactjs + Haskell + Cloud Foundry = Love"
Александр Ломов: "Reactjs + Haskell + Cloud Foundry = Love"Александр Ломов: "Reactjs + Haskell + Cloud Foundry = Love"
Александр Ломов: "Reactjs + Haskell + Cloud Foundry = Love"
 
Fun with DSL
Fun with DSLFun with DSL
Fun with DSL
 
Introducing Language-Oriented Business Applications - Markus Voelter
Introducing Language-Oriented Business Applications - Markus VoelterIntroducing Language-Oriented Business Applications - Markus Voelter
Introducing Language-Oriented Business Applications - Markus Voelter
 
Ijnlc020306NAMED ENTITY RECOGNITION IN NATURAL LANGUAGES USING TRANSLITERATION
Ijnlc020306NAMED ENTITY RECOGNITION IN NATURAL LANGUAGES USING TRANSLITERATIONIjnlc020306NAMED ENTITY RECOGNITION IN NATURAL LANGUAGES USING TRANSLITERATION
Ijnlc020306NAMED ENTITY RECOGNITION IN NATURAL LANGUAGES USING TRANSLITERATION
 
Better problem solving through scripting: How to think through your #eprdctn ...
Better problem solving through scripting: How to think through your #eprdctn ...Better problem solving through scripting: How to think through your #eprdctn ...
Better problem solving through scripting: How to think through your #eprdctn ...
 
Spell checker for Kannada OCR
Spell checker for Kannada OCRSpell checker for Kannada OCR
Spell checker for Kannada OCR
 
POSI Overview
POSI OverviewPOSI Overview
POSI Overview
 

More from Cotap Engineering (7)

How to video.
How to video.How to video.
How to video.
 
Notes on Debugging
Notes on DebuggingNotes on Debugging
Notes on Debugging
 
MQTT
MQTTMQTT
MQTT
 
Security best practices.
Security best practices.Security best practices.
Security best practices.
 
Startup survival lessons
Startup survival lessonsStartup survival lessons
Startup survival lessons
 
Efficient data transfer in Android
Efficient data transfer in AndroidEfficient data transfer in Android
Efficient data transfer in Android
 
Architecting for the Cloud: Hoping for the best, prepared for the worst
Architecting for the Cloud: Hoping for the best, prepared for the worstArchitecting for the Cloud: Hoping for the best, prepared for the worst
Architecting for the Cloud: Hoping for the best, prepared for the worst
 

Recently uploaded

DeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakesDeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakes
MayuraD1
 

Recently uploaded (20)

Design For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startDesign For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the start
 
DeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakesDeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakes
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 
GEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLE
GEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLEGEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLE
GEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLE
 
AIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech studentsAIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech students
 
Work-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxWork-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptx
 
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptxHOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
 
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
 
Hostel management system project report..pdf
Hostel management system project report..pdfHostel management system project report..pdf
Hostel management system project report..pdf
 
kiln thermal load.pptx kiln tgermal load
kiln thermal load.pptx kiln tgermal loadkiln thermal load.pptx kiln tgermal load
kiln thermal load.pptx kiln tgermal load
 
Wadi Rum luxhotel lodge Analysis case study.pptx
Wadi Rum luxhotel lodge Analysis case study.pptxWadi Rum luxhotel lodge Analysis case study.pptx
Wadi Rum luxhotel lodge Analysis case study.pptx
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torque
 
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
COST-EFFETIVE  and Energy Efficient BUILDINGS ptxCOST-EFFETIVE  and Energy Efficient BUILDINGS ptx
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
 
Computer Lecture 01.pptxIntroduction to Computers
Computer Lecture 01.pptxIntroduction to ComputersComputer Lecture 01.pptxIntroduction to Computers
Computer Lecture 01.pptxIntroduction to Computers
 
Engineering Drawing focus on projection of planes
Engineering Drawing focus on projection of planesEngineering Drawing focus on projection of planes
Engineering Drawing focus on projection of planes
 
Employee leave management system project.
Employee leave management system project.Employee leave management system project.
Employee leave management system project.
 
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
 
Introduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaIntroduction to Serverless with AWS Lambda
Introduction to Serverless with AWS Lambda
 

Natural language processing in iOS / OSX

  • 1. Tech Talk
 NLP Tools in iOS/OSX Todd Kramer
  • 2. NLP Tools in iOS/OSX: Topics • CFStringTransform • transliteration, normalization • CFStringTokenizer • string tokenization, language identification • UITextChecker • spell check • NSLinguisticTagger • parts of speech tagging, named entity recognition, lemmatization, language/script identification • NSDataDetector • data detection
  • 3. NLP Tools in iOS/OSX: CFStringTransform The CFStringTransform Function
  • 4. NLP Tools in iOS/OSX: CFStringTransform Transliterate Thai to Latin Original: สวัสดี; Transformed: s̄wạs̄dī
  • 5. NLP Tools in iOS/OSX: CFStringTransform
  • 6. NLP Tools in iOS/OSX: CFStringTransform Transliterate Latin to Gujarati Original: Gujarātī; Transformed: ગuજરાતી
  • 7. NLP Tools in iOS/OSX: CFStringTransform Remove Diacritics and Accents Original: s̄wạs̄dī; Transformed: swasdi
  • 8. NLP Tools in iOS/OSX: CFStringTransform Describe Unicode Characters Original: 👍; Transformed: N{THUMBS UP SIGN}
  • 10. NLP Tools in iOS/OSX: CFStringTokenizer Tokenize Into Words: Simplified Chinese Tokens: [⼈人, ⼈人⽣生, ⽽而, ⾃自由, 在, 尊严, 和, 权利, 上, ⼀一律, 平等, 他们, 赋有, 理性, 和, 良⼼心, 并, 应, 以, 兄弟, 关系, 的, 精神, 互相, 对待]
  • 11. NLP Tools in iOS/OSX: CFStringTokenizer Transliterate Tokens: Simplified Chinese Tokens: [rén, rénshēng, ér, zìyóu, zài, zūnyán, hé, quánlì, shàng, yīlv̀, píngděng, tāmén, fùyǒu, lǐxìng, hé, liángxīn, bìng, yìng, yǐ, xiōngdì, guānxī, de, jīngshén, hùxiāng, duìdài]
  • 12. NLP Tools in iOS/OSX: CFStringTokenizer Language Identification: Icelandic Language Code: is
  • 14. NLP Tools in iOS/OSX: UITextChecker
  • 15. NLP Tools in iOS/OSX: UITextChecker Spell Check Misspelled Range: (7,4); Guesses: Optional([ice, Bice, bide, nice, vice, bike, bile, bite, bace, bbce, bcce, bdce, bece, bfce, dice, lice, mice, pice, rice, brice, bicep]) Misspelled Range: (12,3); Guesses: Optional([ay, cay, day, say])
  • 17. NLP Tools in iOS/OSX: NSLinguisticTagger Parts of Speech Tagging and Named Entity Recognition
  • 18. NLP Tools in iOS/OSX: NSLinguisticTagger NSLinguisticTagger Schemes
  • 19. NLP Tools in iOS/OSX: NSLinguisticTagger Parts of Speech Tagging and Named Entity Recognition
  • 20. NLP Tools in iOS/OSX: NSLinguisticTagger Parts of Speech Tagging and Named Entity Recognition Token: What; Tag: Pronoun Token: is; Tag: Verb Token: the; Tag: Determiner Token: capital; Tag: Noun Token: of; Tag: Preposition Token: New York; Tag: PlaceName
  • 21. NLP Tools in iOS/OSX: NSLinguisticTagger Script Identification
  • 22. NLP Tools in iOS/OSX: NSLinguisticTagger Script Identification Token: hello; Tag: Latn Token: สวัสดี; Tag: Thai Token: bonjour; Tag: Latn Token: 你; Tag: Hani Token: 好; Tag: Hani Token: !લો; Tag: Gujr Token: привет; Tag: Cyrl Token: नमस्ते; Tag: Deva
  • 24. NLP Tools in iOS/OSX: NSDataDetector Extracting Structured Data
  • 25. Match: Lunch tomorrow at 12:30PM; - Date: Optional(2014-11-20 20:30:00 +0000) Match: 1600 Pennsylvania Ave. NW, Washington, D.C. 20500; - Street: Optional(1600 Pennsylvania Ave.); - Zip: Optional(20500) Match: 202-456-1414 Match: 2:15PM; - Date: Optional(2014-11-19 22:15:00 +0000) Match: Southwest Airlines Flight 737 Match: www.southwest.com NLP Tools in iOS/OSX: NSDataDetector Extracting Structured Data