Ted Pedersen > Text-NSP > find-compounds.pl

Download:
Text-NSP-1.27.tar.gz

Annotate this POD

CPAN RT

Open  0
View/Report Bugs
Source  

NAME ^

find-compounds.pl - find compound words in a text that are specified in a list.

DESCRIPTION ^

See perldoc find-compounds.pl

USAGE ^

find-compounds.pl SourceFile CompoundWordList

INPUT ^

Required Arguments:

SourceFile

Source file is the original text file.

CompoundWordList

Compound word list contains the compound words. Compound words are seperated by underscore "_". Each compound word is a line.

Examples:

The original text contains "This is the new york city". In the compound word list, it has

 new_york
 new_york_city

The find-compounds.pl will find the longest match. After replace the compound words, the text is "This is the new_york_city".

Other Options:

--newline

Find compound words within one line boundary with this option. If run find-compounds.pl without this option, find compound words crossing lines.

Displays this message.

--help

Displays this message.

--version

Displays the version information.

AUTHOR ^

Ying Liu. University of Minnesota at Twin Cities. liux0395@umn.edu

COPYRIGHT ^

Copyright (c) 2010-2011, Ying Liu

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to

The Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

syntax highlighting: