Mguesser 0.4

Mguesser is a standalone part of libmnogosearch which allows to guess character set and language of a text file.
Mguesser is a standalone part of libmnogosearch (a core of mnogo search engine) which allows to guess character set and language of a text file.

mguesser is implemented using "N-Gram-Based Text Categorization" technique which is implemented in TextCat language guesser written in Perl (http://www.let.rug.nl/~vannoord/TextCat/). mguesser is significantly faster than TextCat especially on large texts.

This package consist of C written N-gram based algorithms as well as a number of maps for texts in various languages and character sets. Take a look into "maps" directory of this package to check the currently supported languages and character sets.

What's New in This Release:

The -d command line option was added to load language maps from a non-default directory.
A colon-separated list of directories is also supported.
The -t command line option was added to specify how many top n-grams to print into the output map.
The default value is 200, which can be decreased for better performance or increased for better detection quality.
About 30 new model maps were added.

USAGE

mguesser takes a plain text data to STDIN. Note that other "almost text" formats like HTML will return bad results. In later releases I'll possibly add a command line switch to tell mguesser that the input data is HTML. mguesser works fine for texts with size starting from 500 bytes and longer. Shorter texts are guessed not so well.

To guess language and character set of some text file use:

mguesser < text_file

mguesser will display how much your file corresponds to various language maps in the order of quality. mguesser returns values between 0 and 1.

You can also display a specified number of the best results using -n command line switch. For example, this command will display 3 best results:

mguesser -n3 < text_file

To make mguesser load language maps from a non-default directory, use:

mguesser -d/path/to/maps/

To load language maps from multiple directories, use a colon separated list:

mguesser -d/path/to/maps1/:/path/to/maps2/:/path/to/maps3/

To create a new language map, use:

mguesser -p -c charset -l language < text_file

When executed with -p command line parameter, mguesser creates a new language map built on text_file and prints it to STDOUT. Please note that to create a high quality language map, the source text file should be large enough. A 500 Kb text is usually enough to produce a high quality map.

You can also include these files into your own applications. Take a look into main() function which is located in the guesser.c to check the order of guesser functions calls.

last updated on:
April 15th, 2008, 9:08 GMT
price:
FREE!
developed by:
Alexander Barkov
homepage:
www.mnogosearch.org
license type:
GPL (GNU General Public License) 
category:
ROOT \ Text Editing&Processing \ Filters

FREE!

In a hurry? Add it to your Download Basket!

user rating 18

1.9/5
 

0/5

Add your review!

SUBMIT