// GraphmatThick.cpp : Defines the entry point for the console application.
//
#include "../common/util_classes.h"
#include "../GraphanLib/GraphmatFile.h"
void PrintUsageAndExit()
{
printf ("GraphmatThick, Test for Dialing Graphematical Analysis(www.aot.ru)\n");
printf ("Usage: GraphmatThick \n\n");
printf ("where language can be Russian, English, or German\n");
printf (" file is an text or html file in CP-1251 coding\n");
printf (" 1. Russian - CP-1251 coding\n");
printf (" 2. German - ISO-8859-1 coding\n");
printf (" Here are possible options:\n");
printf (" if \"-gra\" is specified then the program prints .gra file with the g-table \n");
printf (" if \"-xml\" is specified then the program prints .xml file with macrosyntax structure \n");
printf (" if \"-sents\" is specified then the program prints .sents file with one sentence per line\n");
printf (" if \"-abbrs\" is specified then the program prints .abbrs file with one abbreviation per line\n");
printf (" if \"-disable-sent-breaker\" is specified then the program disabled sentence breaker\n");
printf (" if \"-use-paragraph-tag\" is specified then the program considers \"
\" as a paragraph delimeter\n");
printf (" if \"-write-non-printable\" is specified then the program considers \"\" as a paragraph delimeter\n");
exit(1);
};
int main(int argc, char* argv[])
{
try
{
if (argc < 3)
PrintUsageAndExit();
string strErr;
if (!IsRmlRegistered(strErr))
{
printf ("Error: %s!", strErr.c_str());
};
MorphLanguageEnum Langua;
if (!GetLanguageByString (argv[1], Langua))
{
printf ("False language - \"%s\"\n",argv[1]);
return 1;
};
bool bWriteXml = false;
bool bWriteGra = false;
bool bSentsPrint = false;
bool bAbbrsPrint = false;
bool bEnableSentenceBreaker = true;
bool bWriteNonPrintable = false;
bool bUseParagraphTagToDivide = false;
string FileName;
for (size_t i=3; i 32)
printf ("1, // %c\n",(BYTE)i);
else
printf ("1, // non-printable\n",(BYTE)i);
else
printf ("0, \n");*/
return 0;
}
catch (CExpc C)
{
printf ("An exception occurred:%s!\n", C.m_strCause.c_str());
}
catch (...)
{
printf ("An exception occurred!\n");
};
return 1;
}