Ted Pedersen
and 1 contributors


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


See perldoc find-compounds.pl


find-compounds.pl SourceFile CompoundWordList


Required Arguments:


Source file is the original text file.


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


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


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:


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.


Displays this message.


Displays the version information.


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


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.