00001 #include <plearn/base/general.h> 00002 #include <plearn/io/TypesNumeriques.h> 00003 00004 using namespace PLearn; 00005 00006 // usage : numeric_filter < in.text > filtered_out.text 00007 00008 int main(int argc, char** argv) 00009 { 00010 if (argc != 1) 00011 PLERROR("usage : numeric_filter < in.text > filtered_out.text"); 00012 string word; 00013 while (true) 00014 { 00015 cin >> word; 00016 if (!cin) break; 00017 if (looksNumeric(word.c_str())) 00018 //cout << "<numeric>" << " : " << word << endl; 00019 cout << "<numeric>" << endl; 00020 else 00021 cout << word << endl; 00022 } 00023 }