- Main Page
- Namespaces
- Classes
- Files

# D:/projects/ACE/proto/Source/structs.h

Go to the documentation of this file.

    00001
    00006 #ifndef _STRUCTS_H
    00007 #define _STRUCTS_H
    00008
    00009 #include <map>
    00010 #include <string>
    00011 #include <vector>
    00012
    00013 namespace ace {
    00014
    00017 struct Dependency {
    00018     typedef enum Type {
    00019         Adv,
    00020         Adv_Ap,
    00021         Adv_Co,
    00022         Adv_Pa,
    00023         AdvAtr,
    00024         AdvAtr_Ap,
    00025         AdvAtr_Co,
    00026         AdvAtr_Pa,
    00027         Apos,
    00028         Apos_Ap,
    00029         Apos_Co,
    00030         Apos_Pa,
    00031         Atr,
    00032         Atr_Ap,
    00033         Atr_Co,
    00034         Atr_Pa,
    00035         AtrAdv,
    00036         AtrAdv_Ap,
    00037         AtrAdv_Co,
    00038         AtrAdv_Pa,
    00039         AtrAtr,
    00040         AtrAtr_Ap,
    00041         AtrAtr_Co,
    00042         AtrAtr_Pa,
    00043         AtrObj,
    00044         AtrObj_Ap,
    00045         AtrObj_Co,
    00046         AtrObj_Pa,
    00047         Atv,
    00048         Atv_Ap,
    00049         Atv_Co,
    00050         Atv_Pa,
    00051         AtvV,
    00052         AtvV_Ap,
    00053         AtvV_Co,
    00054         AtvV_Pa,
    00055         Aux,
    00056         Aux_Ap,
    00057         Aux_Co,
    00058         Aux_Pa,
    00059         AuxC,
    00060         AuxC_Ap,
    00061         AuxC_Co,
    00062         AuxC_Pa,
    00063         AuxG,
    00064         AuxG_Ap,
    00065         AuxG_Co,
    00066         AuxG_Pa,
    00067         AuxK,
    00068         AuxK_Ap,
    00069         AuxK_Co,
    00070         AuxK_Pa,
    00071         AuxO,
    00072         AuxO_Ap,
    00073         AuxO_Co,
    00074         AuxO_Pa,
    00075         AuxP,
    00076         AuxP_Ap,
    00077         AuxP_Co,
    00078         AuxP_Pa,
    00079         AuxR,
    00080         AuxR_Ap,
    00081         AuxR_Co,
    00082         AuxR_Pa,
    00083         AuxS,
    00084         AuxS_Ap,
    00085         AuxS_Co,
    00086         AuxS_Pa,
    00087         AuxT,
    00088         AuxT_Ap,
    00089         AuxT_Co,
    00090         AuxT_Pa,
    00091         AuxV,
    00092         AuxV_Ap,
    00093         AuxV_Co,
    00094         AuxV_Pa,
    00095         AuxX,
    00096         AuxX_Ap,
    00097         AuxX_Co,
    00098         AuxX_Pa,
    00099         AuxY,
    00100         AuxY_Ap,
    00101         AuxY_Co,
    00102         AuxY_Pa,
    00103         AuxZ,
    00104         AuxZ_Ap,
    00105         AuxZ_Co,
    00106         AuxZ_Pa,
    00107         Coord,
    00108         Coord_Ap,
    00109         Coord_Co,
    00110         Coord_Pa,
    00111         ExD,
    00112         ExD_Ap,
    00113         ExD_Co,
    00114         ExD_Pa,
    00115         Head, // alghoritm's own, special-purpose dependency type
    00116         Obj,
    00117         Obj_Ap,
    00118         Obj_Co,
    00119         Obj_Pa,
    00120         ObjAtr,
    00121         ObjAtr_Ap,
    00122         ObjAtr_Co,
    00123         ObjAtr_Pa,
    00124         Pnom,
    00125         Pnom_Ap,
    00126         Pnom_Co,
    00127         Pnom_Pa,
    00128         Pred,
    00129         Pred_Ap,
    00130         Pred_Co,
    00131         Pred_Pa,
    00132         Sb,
    00133         Sb_Ap,
    00134         Sb_Co,
    00135         Sb_Pa,
    00136         Undef // program's own, special-purpose dependency type
    00137     };
    00138 };
    00139
    00140
    00143 struct Entity {
    00144     typedef enum Type {
    00145         // Enumeration must start after the Dependency::Type!
    00146         Word = Dependency::Undef + 1, // Word
    00147         EoS, // End of sentence
    00148         EoD, // End of document
    00149         Undef // Not defined
    00150     };
    00151 };
    00152
    00153
    00156 struct Stats {
    00159     size_t words;
    00162     size_t sentences;
    00165     size_t documents;
    00168     Stats(void): words(0), sentences(0), documents(0) {}
    00169 };
    00170
    00171
    00174 typedef std::map<std::string, Dependency::Type> string_2_dependency_t;
    00177 typedef std::vector<std::string> dependency_2_string_t;
    00178
    00179
    00184 void initMappings(dependency_2_string_t& dependency_to_string, string_2_dependency_t& string_to_dependency);
    00185
    00186 } // namespace ace
    00187
    00188 #endif