Tanl Linguistic Pipeline |
00001 /* 00002 ** Tanl 00003 ** Corpus/Language.h 00004 ** ---------------------------------------------------------------------- 00005 ** Copyright (c) 2005 Giuseppe Attardi (attardi@di.unipi.it). 00006 ** ---------------------------------------------------------------------- 00007 ** 00008 ** This file is part of Tanl. 00009 ** 00010 ** Tanl is free software; you can redistribute it and/or modify it 00011 ** under the terms of the GNU General Public License, version 3, 00012 ** as published by the Free Software Foundation. 00013 ** 00014 ** Tanl is distributed in the hope that it will be useful, 00015 ** but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00017 ** GNU General Public License for more details. 00018 ** 00019 ** You should have received a copy of the GNU General Public License 00020 ** along with this program. If not, see <http://www.gnu.org/licenses/>. 00021 ** ---------------------------------------------------------------------- 00022 */ 00023 00024 #ifndef Tanl_Corpus_Language_H 00025 #define Tanl_Corpus_Language_H 00026 00027 #include <string> 00028 00029 namespace Tanl { 00030 00036 struct Language 00037 { 00038 char const* verbCPos; 00039 char const* nounCPos; 00040 char const* prepCPos; 00041 char const* timeDep; 00042 char const* locDep; 00043 bool hasPostpositions; 00044 00045 Language(char const* v = "VB", char const* n = "NN", char const* p = "IN") : 00046 verbCPos(v), 00047 nounCPos(n), 00048 prepCPos(p), 00049 timeDep(""), 00050 locDep(""), 00051 hasPostpositions(false) 00052 { } 00053 00055 virtual bool rootPos(std::string const& pos) const { return true; } 00056 00057 virtual char const* rootLabel() const; 00058 00060 char const* code() const; 00061 00063 static Language const* get(char const* code); 00064 00066 virtual bool numbAgree(char x, char y) const { return false; } 00067 00069 virtual bool gendAgree(char x, char y) const { return false; } 00070 00072 virtual bool morphoLeft(std::string const& pos) const { return false; } 00073 00075 virtual bool morphoRight(std::string const& pos) const { return false; } 00076 }; 00077 00081 struct ArabicLanguage : public Language 00082 {}; 00083 00087 struct IndianLanguage : public Language 00088 { 00089 char const* rootLabel() const; 00090 }; 00091 00095 struct BanglaLanguage : public IndianLanguage 00096 {}; 00097 00101 struct BasqueLanguage : public Language 00102 {}; 00103 00107 struct BulgarianLanguage : public Language 00108 {}; 00109 00113 struct CatalanLanguage : public Language 00114 { 00115 char const* rootLabel() const; 00116 }; 00117 00121 struct ChineseLanguage : public Language 00122 {}; 00123 00127 struct CzechLanguage : public Language 00128 {}; 00129 00133 struct DanishLanguage : public Language 00134 {}; 00135 00139 struct DutchLanguage : public Language 00140 {}; 00141 00145 struct EnglishLanguage : public Language 00146 {}; 00147 00151 struct FrenchLanguage : public Language 00152 { 00153 char const* rootLabel() const; 00154 }; 00155 00159 struct GermanLanguage : public Language 00160 {}; 00161 00165 struct GreekLanguage : public Language 00166 {}; 00167 00171 struct ItalianLanguage : public Language 00172 {}; 00173 00177 struct ItalianTutLanguage : public Language 00178 { 00179 char const* rootLabel() const; 00180 }; 00181 00185 struct JapaneseLanguage : public Language 00186 {}; 00187 00191 struct HindiLanguage : public IndianLanguage 00192 {}; 00193 00197 struct HungarianLanguage : public Language 00198 {}; 00199 00203 struct PortugueseLanguage : public Language 00204 {}; 00205 00209 struct SloveneLanguage : public Language 00210 {}; 00211 00215 struct SpanishLanguage : public Language 00216 { 00217 char const* rootLabel() const; 00218 }; 00219 00223 struct SwedishLanguage : public Language 00224 {}; 00225 00229 struct TeluguLanguage : public IndianLanguage 00230 {}; 00231 00235 struct TurkishLanguage : public Language 00236 {}; 00237 00238 } // namespace Tanl 00239 00240 #endif // Tanl_Language_H