3 * ----START-LICENCE----
4 * Copyright 1999,2000,2001 BrightStation PLC
5 * Copyright 2002 Ananova Ltd
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License as
9 * published by the Free Software Foundation; either version 2 of the
10 * License, or (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
21 * -----END-LICENCE-----
36 #include "om/omstem.h"
39 stemfile(const OmStem
&stemmer
, FILE * f
)
43 if (ch
== EOF
) return;
61 cout
<< stemmer
.stem_word(word
);
65 int main(int argc
, char **argv
)
67 std::string lang
= "english";
69 struct option opts
[] = {
70 {"language", required_argument
, 0, 'l'},
74 bool syntax_error
= false;
77 while ((c
= getopt_long(argc
, argv
, "l", opts
, NULL
)) != EOF
) {
87 while (argv
[optind
]) {
88 FILE * f
= fopen(argv
[optind
], "r");
90 cerr
<< "File " << argv
[optind
] << " not found\n";
96 } catch (const OmError
&e
) {
97 cout
<< e
.get_msg() << endl
;