Natural Language Processing with PerlG JaganadhC-DAC Thiruvananthapuram           FossConf 2008 Chennai
Talk OverviewIntroductionNatural Language ProcessingPerlPerl Lingua ModulesSome examplesTowards future                 Fos...
Introduction•Objectives   of the talk    Introducing NLP techniques for Language Researchers                       FossCon...
Natural LanguageProcessingIntroduction to NLPSub fields in NLP                    FossConf 2008 Chennai
Perl•Practical   Extraction and Report Language Free and Open Source Easy to Learn Powerful regular Expressions for text s...
Perl Lingua ModulesPerl Modules for Linguistic ProcessingAll most all modules are for English Dutch and otherEuropean Lang...
Some ExamplesCounting words in a textPattern MatchingUse of Lingua::EN::SentenceUse of Lingua::EN::NamedEntity            ...
Counting words$text = <>;while ($line = <>) {$text .= $line;}#$text =~ tr/a-z��������A-Z���������n/cs;@words = split(/n/, ...
Lingua::EN::Sentence#!/usr/local/bin/perl -wuse Lingua::EN::Sentence qw( get_sentences add_acronyms );## adding support fo...
Lingua::EN::NamedEntity#!/usr/bin/perluse strict;use Lingua::EN::NamedEntity;while (<>) {my $str = join n,<>;#my $str = jo...
Pattern Matchingwhile ($line = <>) {     if ($line =~ m/_____/ ) {         print $line ;     }}                           ...
Toward future Lingua Modules for Indian Languages Useful Stuff•http://search.cpan.org/search?query=Lingua&mode=all http://...
Question ?FossConf 2008 Chennai
Thanksjaganadhg@gmail.com FossConf 2008 Chennai
Upcoming SlideShare
Loading in …5
×

Natural Language Processing with Per

1,873 views

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,873
On SlideShare
0
From Embeds
0
Number of Embeds
29
Actions
Shares
0
Downloads
13
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Natural Language Processing with Per

  1. 1. Natural Language Processing with PerlG JaganadhC-DAC Thiruvananthapuram FossConf 2008 Chennai
  2. 2. Talk OverviewIntroductionNatural Language ProcessingPerlPerl Lingua ModulesSome examplesTowards future FossConf 2008 Chennai
  3. 3. Introduction•Objectives of the talk Introducing NLP techniques for Language Researchers FossConf 2008 Chennai
  4. 4. Natural LanguageProcessingIntroduction to NLPSub fields in NLP FossConf 2008 Chennai
  5. 5. Perl•Practical Extraction and Report Language Free and Open Source Easy to Learn Powerful regular Expressions for text searching FossConf 2008 Chennai
  6. 6. Perl Lingua ModulesPerl Modules for Linguistic ProcessingAll most all modules are for English Dutch and otherEuropean LanguagesPowerful implementation of different NLP algorithms FossConf 2008 Chennai
  7. 7. Some ExamplesCounting words in a textPattern MatchingUse of Lingua::EN::SentenceUse of Lingua::EN::NamedEntity FossConf 2008 Chennai
  8. 8. 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
  9. 9. Lingua::EN::Sentence#!/usr/local/bin/perl -wuse Lingua::EN::Sentence qw( get_sentences add_acronyms );## adding support for abbreviationsadd_acronyms(lt,gen);$/ = "nn";while(<>) { $sentences=get_sentences($_); foreach $s (@$sentences) { print "<s> $s </s>n"; }} FossConf 2008 Chennai
  10. 10. Lingua::EN::NamedEntity#!/usr/bin/perluse 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
  11. 11. Pattern Matchingwhile ($line = <>) { if ($line =~ m/_____/ ) { print $line ; }} FossConf 2008 Chennai
  12. 12. 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
  13. 13. Question ?FossConf 2008 Chennai
  14. 14. Thanksjaganadhg@gmail.com FossConf 2008 Chennai

×