Exemple #1
0
PolyAnalyzer*
PolyAnalyzer_Load_IMP(PolyAnalyzer *self, Obj *dump) {
    Hash *source = (Hash*)CERTIFY(dump, HASH);
    PolyAnalyzer_Load_t super_load 
        = SUPER_METHOD_PTR(POLYANALYZER, LUCY_PolyAnalyzer_Load);
    PolyAnalyzer *loaded = super_load(self, dump);
    VArray *analyzer_dumps
        = (VArray*)CERTIFY(Hash_Fetch_Utf8(source, "analyzers", 9), VARRAY);
    VArray *analyzers
        = (VArray*)CERTIFY(Freezer_load((Obj*)analyzer_dumps), VARRAY);
    PolyAnalyzer_init(loaded, NULL, analyzers);
    DECREF(analyzers);
    return loaded;
}
Exemple #2
0
PolyAnalyzer*
PolyAnalyzer_new(String *language, VArray *analyzers) {
    PolyAnalyzer *self = (PolyAnalyzer*)VTable_Make_Obj(POLYANALYZER);
    return PolyAnalyzer_init(self, language, analyzers);
}
Exemple #3
0
PolyAnalyzer*
PolyAnalyzer_new(String *language, Vector *analyzers) {
    PolyAnalyzer *self = (PolyAnalyzer*)Class_Make_Obj(POLYANALYZER);
    return PolyAnalyzer_init(self, language, analyzers);
}