Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

langident(1p) [debian man page]

LANGIDENT(1p)						User Contributed Perl Documentation					     LANGIDENT(1p)

NAME
langident - identifies the language files are written in SYNOPSIS
langident [OPTIONS] file1 [file2 ...] DESCRIPTION
Identifies the language files are written in using Perl module Lingua::Identify. OPTIONS -a Show all results (not just the most probable language). -c Show confidence level for most probable language (it will be the first value right after the most probable language). -d Debug (development only). -E ENCODING Select an input encoding. Defaults to UTF-8. # use ISO-8859-1 (latin1) langident -E ISO-8859-1 file -e METHODS Select the method(s) to use. There are three ways of doing this: # simply using a method langident -e ngrams3 file # using several methods (separate them with a comma) langident -e prefixes3,suffixes3 # using several methods and assign different weights to each of them langident -e smallwords=2,prefixes=1,ngrams3=1.3 The available methods are the following: smallwords, prefixes1, prefixes2, prefixes3, prefixes4, suffixes1, suffixes2, suffixes3, suffixes4, ngrams1, ngrams2, ngrams3 and ngrams4. -h Display help message and exit. -l List all available languages and exit. -m NUMBER Set maximum number of results (languages) to display (shows the N most probable languages, by descending order of probability). Overrides the -a switch. -o LANGUAGES Only work with specified languages. # identify between Portuguese and English only langident -o pt,en * -p Also show percentages. -s SIZE Maximum size to examine. -v Show version and exit. EXAMPLES
Use methods ngrams2 and ngrams1, assigning the double of importance to ngrams2 (-e switch); output will include the three most probable languages (-m switch) with its percentages (-p switch) and also the confidence level (-c switch) of the first result. $ langident -e ngrams2=2,ngrams1 -c -p -m 3 README README:en 65.7209505939491 7.8971987481393 ga 4.11905889385895 tr 4.08487011400505 $ TO DO
o Add a switch to ignore HTML tags (and maybe other formats too) SEE ALSO
Lingua::Identify(3), Text::ExtractWords(3), Text::Ngram(3), Text::Affixes(3). A linguist and/or a shrink. The latest CVS version of "Lingua::Identify" (which includes langident) can be attained at http://natura.di.uminho.pt/natura/viewcvs.cgi/Lingua/Identify/ ISO 639 Language Codes, at http://www.w3.org/WAI/ER/IG/ert/iso639.htm AUTHOR
Jose Alves de Castro, <cog@cpan.org> COPYRIGHT AND LICENSE
Copyright 2004 by Jose Alves de Castro This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.14.2 2010-05-21 LANGIDENT(1p)

Check Out this Related Man Page

Lingua::StopWords(3pm)					User Contributed Perl Documentation				    Lingua::StopWords(3pm)

NAME
Lingua::StopWords - Stop words for several languages. SYNOPSIS
use Lingua::StopWords qw( getStopWords ); my $stopwords = getStopWords('en'); my @words = qw( i am the walrus goo goo g'joob ); # prints "walrus goo goo g'joob" print join ' ', grep { !$stopwords->{$_} } @words; DESCRIPTION
In keyword search, it is common practice to suppress a collection of "stopwords": words such as "the", "and", "maybe", etc. which exist in in a large number of documents and do not tell you anything important about any document which contains them. This module provides such "stoplists" in several languages. Supported Languages |-----------------------------------------------------------| | Language | ISO code | default encoding | also available | |-----------------------------------------------------------| | Danish | da | ISO-8859-1 | UTF-8 | | Dutch | nl | ISO-8859-1 | UTF-8 | | English | en | ISO-8859-1 | UTF-8 | | Finnish | fi | ISO-8859-1 | UTF-8 | | French | fr | ISO-8859-1 | UTF-8 | | German | de | ISO-8859-1 | UTF-8 | | Hungarian | hu | ISO-8859-1 | UTF-8 | | Italian | it | ISO-8859-1 | UTF-8 | | Norwegian | no | ISO-8859-1 | UTF-8 | | Portuguese | pt | ISO-8859-1 | UTF-8 | | Spanish | es | ISO-8859-1 | UTF-8 | | Swedish | sv | ISO-8859-1 | UTF-8 | | Russian | ru | KOI8-R | UTF-8 | |-----------------------------------------------------------| FUNCTIONS
getStopWords my $stoplist = getStopWords('en'); my $utf8_stoplist = getStopWords('en', 'UTF-8'); Retrieve a stoplist in the form of a hashref where the keys are all stopwords and the values are all 1. $stoplist = { and => 1, if => 1, # ... }; getStopWords() expects 1-2 arguments. The first, which is required, is an ISO code representing a supported language. If the ISO code cannot be found, getStopWords returns undef. The second argument should be 'UTF-8' if you want the stopwords encoded in UTF-8. The UTF-8 flag will be turned on, so make sure you understand all the implications of that. SEE ALSO
The stoplists supplied by this module were created as part of the Snowball project (see <http://snowball.tartarus.org>, Lingua::Stem::Snowball). Lingua::EN::StopWords provides a different stoplist for English. AUTHOR
Maintained by Marvin Humphrey <marvin at rectangular dot com>. Original author Fabien Potencier, <fabpot at cpan dot org>. COPYRIGHT AND LICENSE
Copyright 2004-2008 Fabien Potencier, Marvin Humphrey This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.3 or, at your option, any later version of Perl 5 you may have available. perl v5.10.0 2009-02-23 Lingua::StopWords(3pm)
Man Page