SlideShare ist ein Scribd-Unternehmen logo
1 von 14
Downloaden Sie, um offline zu lesen
Natural Language Processing with Perl




G Jaganadh
C-DAC Thiruvananthapuram


           FossConf 2008 Chennai
Talk Overview
Introduction

Natural Language Processing

Perl

Perl Lingua Modules

Some examples

Towards future



                 FossConf 2008 Chennai
Introduction


•Objectives   of the talk
    Introducing NLP techniques for Language Researchers




                       FossConf 2008 Chennai
Natural Language
Processing



Introduction to NLP

Sub fields in NLP




                    FossConf 2008 Chennai
Perl


•Practical   Extraction and Report Language

 Free and Open Source

 Easy to Learn

 Powerful regular Expressions for text searching




                       FossConf 2008 Chennai
Perl Lingua Modules


Perl Modules for Linguistic Processing

All most all modules are for English Dutch and other

European Languages

Powerful implementation of different NLP algorithms




                  FossConf 2008 Chennai
Some Examples


Counting words in a text

Pattern Matching

Use of Lingua::EN::Sentence

Use of Lingua::EN::NamedEntity




                   FossConf 2008 Chennai
Counting words
$text = <>;
while ($line = <>) {
$text .= $line;
}
#$text =~ tr/a-z��������A-Z���������n/cs;
@words = split(/n/, $text);
for ($i = 0; $i <= $#words; $i++) {
      if (!exists($frequency{$words[$i]})) {
             $frequency{$words[$i]} = 1;
      } else {
             $frequency{$words[$i]}++;
      }
}
foreach $word (sort keys %frequency){
      print "$frequency{$word} $wordn";
}


                            FossConf 2008 Chennai
Lingua::EN::Sentence

#!/usr/local/bin/perl -w
use Lingua::EN::Sentence qw( get_sentences add_acronyms );
## adding support for abbreviations
add_acronyms('lt','gen');
$/ = "nn";

while(<>) {
  $sentences=get_sentences($_);
  foreach $s (@$sentences) {
     print "<s> $s </s>n";
  }
}



                          FossConf 2008 Chennai
Lingua::EN::NamedEntity

#!/usr/bin/perl
use strict;
use Lingua::EN::NamedEntity;
while (<>) {
my $str = join 'n',<>;
#my $str = join 'n',<INP>;
my @entities = extract_entities($str);
foreach my $entity (@entities) {
     print $entity->{entity},"n";
          }
}




                           FossConf 2008 Chennai
Pattern Matching

while ($line = <>) {

     if ($line =~ m/_____/ ) {

         print $line ;

     }

}




                            FossConf 2008 Chennai
Toward future

 Lingua Modules for Indian Languages

 Useful Stuff
•http://search.cpan.org/search?query=Lingua&mode=all

 http://wiki.christophchamp.com/index.php/Perl/Modules/Lingu




                   FossConf 2008 Chennai
Question ?




FossConf 2008 Chennai
Thanks
jaganadhg@gmail.com




 FossConf 2008 Chennai

Weitere ähnliche Inhalte

Andere mochten auch

Script to Sentiment : on future of Language TechnologyMysore latest
Script to Sentiment : on future of Language TechnologyMysore latestScript to Sentiment : on future of Language TechnologyMysore latest
Script to Sentiment : on future of Language TechnologyMysore latest
Jaganadh Gopinadhan
 
Vijay_Kr_Singh_Oracle_SQL_PLSQL_Developer
Vijay_Kr_Singh_Oracle_SQL_PLSQL_DeveloperVijay_Kr_Singh_Oracle_SQL_PLSQL_Developer
Vijay_Kr_Singh_Oracle_SQL_PLSQL_Developer
Vijay Kumar Singh
 
Salman Mahmood Resume
Salman Mahmood ResumeSalman Mahmood Resume
Salman Mahmood Resume
salman321
 

Andere mochten auch (12)

RamaRaju
RamaRajuRamaRaju
RamaRaju
 
Script to Sentiment : on future of Language TechnologyMysore latest
Script to Sentiment : on future of Language TechnologyMysore latestScript to Sentiment : on future of Language TechnologyMysore latest
Script to Sentiment : on future of Language TechnologyMysore latest
 
Hdfs
HdfsHdfs
Hdfs
 
Jude_Resume_Technical
Jude_Resume_TechnicalJude_Resume_Technical
Jude_Resume_Technical
 
A tutorial on Machine Translation
A tutorial on Machine TranslationA tutorial on Machine Translation
A tutorial on Machine Translation
 
Vijay_Kr_Singh_Oracle_SQL_PLSQL_Developer
Vijay_Kr_Singh_Oracle_SQL_PLSQL_DeveloperVijay_Kr_Singh_Oracle_SQL_PLSQL_Developer
Vijay_Kr_Singh_Oracle_SQL_PLSQL_Developer
 
Salman Mahmood Resume
Salman Mahmood ResumeSalman Mahmood Resume
Salman Mahmood Resume
 
IT BA Pre Sale Consulting
IT BA Pre Sale ConsultingIT BA Pre Sale Consulting
IT BA Pre Sale Consulting
 
Complications of local anasthesia in dentistry
Complications of local anasthesia in dentistryComplications of local anasthesia in dentistry
Complications of local anasthesia in dentistry
 
Serafin Gonzalez Motos - Curriculum Vitae
Serafin Gonzalez Motos - Curriculum VitaeSerafin Gonzalez Motos - Curriculum Vitae
Serafin Gonzalez Motos - Curriculum Vitae
 
Infrastructure as code: running microservices on AWS using Docker, Terraform,...
Infrastructure as code: running microservices on AWS using Docker, Terraform,...Infrastructure as code: running microservices on AWS using Docker, Terraform,...
Infrastructure as code: running microservices on AWS using Docker, Terraform,...
 
Blockchain in IoT and Other Considerations by Dinis Guarda
Blockchain in IoT and Other Considerations by Dinis GuardaBlockchain in IoT and Other Considerations by Dinis Guarda
Blockchain in IoT and Other Considerations by Dinis Guarda
 

Ähnlich wie Natural Language Processing with Per

Drupal 8's Multilingual APIs: Building for the Entire World
Drupal 8's Multilingual APIs: Building for the Entire WorldDrupal 8's Multilingual APIs: Building for the Entire World
Drupal 8's Multilingual APIs: Building for the Entire World
Christian López Espínola
 
Traits: A New Language Feature for PHP?
Traits: A New Language Feature for PHP?Traits: A New Language Feature for PHP?
Traits: A New Language Feature for PHP?
Stefan Marr
 

Ähnlich wie Natural Language Processing with Per (20)

Drupaljam xl 2019 presentation multilingualism makes better programmers
Drupaljam xl 2019 presentation   multilingualism makes better programmersDrupaljam xl 2019 presentation   multilingualism makes better programmers
Drupaljam xl 2019 presentation multilingualism makes better programmers
 
型ヒントについて考えよう!
型ヒントについて考えよう!型ヒントについて考えよう!
型ヒントについて考えよう!
 
Php Vs Phyton
Php Vs PhytonPhp Vs Phyton
Php Vs Phyton
 
Introduction to Modern Perl
Introduction to Modern PerlIntroduction to Modern Perl
Introduction to Modern Perl
 
Prersentation
PrersentationPrersentation
Prersentation
 
Drupal 8's Multilingual APIs: Building for the Entire World
Drupal 8's Multilingual APIs: Building for the Entire WorldDrupal 8's Multilingual APIs: Building for the Entire World
Drupal 8's Multilingual APIs: Building for the Entire World
 
My cool new Slideshow!
My cool new Slideshow!My cool new Slideshow!
My cool new Slideshow!
 
slidesharenew1
slidesharenew1slidesharenew1
slidesharenew1
 
Getting started with php
Getting started with phpGetting started with php
Getting started with php
 
Php mysql
Php mysqlPhp mysql
Php mysql
 
Phpwebdevelping
PhpwebdevelpingPhpwebdevelping
Phpwebdevelping
 
PHP Introduction and Training Material
PHP Introduction and Training MaterialPHP Introduction and Training Material
PHP Introduction and Training Material
 
Python: The Programmer's Lingua Franca
Python: The Programmer's Lingua FrancaPython: The Programmer's Lingua Franca
Python: The Programmer's Lingua Franca
 
How to expand your nlp solution to new languages using transfer learning
How to expand your nlp solution to new languages using transfer learningHow to expand your nlp solution to new languages using transfer learning
How to expand your nlp solution to new languages using transfer learning
 
Phpwebdev
PhpwebdevPhpwebdev
Phpwebdev
 
Perl 101
Perl 101Perl 101
Perl 101
 
Mastering Namespaces in PHP
Mastering Namespaces in PHPMastering Namespaces in PHP
Mastering Namespaces in PHP
 
PHPBootcamp - Zend Framework
PHPBootcamp - Zend FrameworkPHPBootcamp - Zend Framework
PHPBootcamp - Zend Framework
 
Php mysql training-in-mumbai
Php mysql training-in-mumbaiPhp mysql training-in-mumbai
Php mysql training-in-mumbai
 
Traits: A New Language Feature for PHP?
Traits: A New Language Feature for PHP?Traits: A New Language Feature for PHP?
Traits: A New Language Feature for PHP?
 

Mehr von Jaganadh Gopinadhan

Practical Natural Language Processing
Practical Natural Language ProcessingPractical Natural Language Processing
Practical Natural Language Processing
Jaganadh Gopinadhan
 
Practical Natural Language Processing
Practical Natural Language ProcessingPractical Natural Language Processing
Practical Natural Language Processing
Jaganadh Gopinadhan
 
Sanskrit and Computational Linguistic
Sanskrit and Computational Linguistic Sanskrit and Computational Linguistic
Sanskrit and Computational Linguistic
Jaganadh Gopinadhan
 

Mehr von Jaganadh Gopinadhan (19)

Introduction to Sentiment Analysis
Introduction to Sentiment AnalysisIntroduction to Sentiment Analysis
Introduction to Sentiment Analysis
 
Elements of Text Mining Part - I
Elements of Text Mining Part - IElements of Text Mining Part - I
Elements of Text Mining Part - I
 
Practical Natural Language Processing
Practical Natural Language ProcessingPractical Natural Language Processing
Practical Natural Language Processing
 
Practical Natural Language Processing
Practical Natural Language ProcessingPractical Natural Language Processing
Practical Natural Language Processing
 
Sanskrit and Computational Linguistic
Sanskrit and Computational Linguistic Sanskrit and Computational Linguistic
Sanskrit and Computational Linguistic
 
Natural Language Processing
Natural Language ProcessingNatural Language Processing
Natural Language Processing
 
Ilucbe python v1.2
Ilucbe python v1.2Ilucbe python v1.2
Ilucbe python v1.2
 
Social Media Analytics
Social Media Analytics Social Media Analytics
Social Media Analytics
 
Success Factor
Success Factor Success Factor
Success Factor
 
ntroduction to GNU/Linux Linux Installation and Basic Commands
ntroduction to GNU/Linux Linux Installation and Basic Commands ntroduction to GNU/Linux Linux Installation and Basic Commands
ntroduction to GNU/Linux Linux Installation and Basic Commands
 
Let’s Learn Python An introduction to Python
Let’s Learn Python An introduction to Python Let’s Learn Python An introduction to Python
Let’s Learn Python An introduction to Python
 
Introduction to Free and Open Source Software
Introduction to Free and Open Source Software Introduction to Free and Open Source Software
Introduction to Free and Open Source Software
 
Opinion Mining and Sentiment Analysis Issues and Challenges
Opinion Mining and Sentiment Analysis Issues and Challenges Opinion Mining and Sentiment Analysis Issues and Challenges
Opinion Mining and Sentiment Analysis Issues and Challenges
 
What they think about my brand/product ?!?!? An Introduction to Sentiment Ana...
What they think about my brand/product ?!?!? An Introduction to Sentiment Ana...What they think about my brand/product ?!?!? An Introduction to Sentiment Ana...
What they think about my brand/product ?!?!? An Introduction to Sentiment Ana...
 
Tools andTechnologies for Large Scale Data Mining
Tools andTechnologies for Large Scale Data Mining Tools andTechnologies for Large Scale Data Mining
Tools andTechnologies for Large Scale Data Mining
 
Practical Natural Language Processing From Theory to Industrial Applications
Practical Natural Language Processing From Theory to Industrial Applications Practical Natural Language Processing From Theory to Industrial Applications
Practical Natural Language Processing From Theory to Industrial Applications
 
Mahout Tutorial FOSSMEET NITC
Mahout Tutorial FOSSMEET NITCMahout Tutorial FOSSMEET NITC
Mahout Tutorial FOSSMEET NITC
 
Practical Machine Learning
Practical Machine Learning Practical Machine Learning
Practical Machine Learning
 
Will Foss get me a Job?
Will Foss get me a Job?Will Foss get me a Job?
Will Foss get me a Job?
 

Kürzlich hochgeladen

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Kürzlich hochgeladen (20)

MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 

Natural Language Processing with Per