2 * Copyright (C) 2004-2006 Felipe Sánchez-Martínez
3 * Copyright (C) 2006 Universitat d'Alacant
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License as
7 * published by the Free Software Foundation; either version 2 of the
8 * License, or (at your option) any later version.
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
21 * Class Segment. It define a text segment (header file)
23 * @author Felipe Sánchez-Martínez - fsanchez@dlsi.ua.es
35 #include <apertium/tagger_word.h>
36 #include <apertium/tagger_data.h>
37 #include <apertium/morpho_stream.h>
38 #include <apertium/tagger_utils.h>
40 #include "StringCollection.H"
41 #include "TransferRules.H"
43 #define TAGGER_WORD_BUFFER_SIZE 100
49 static map<wstring, TTag, Ltstr> tag_index;
53 vector< vector<TTag> > contador_caminos; //Vector con las etiquetas de cada nodo del segmento
55 vector<int> nfijo_caminos; //Vector con el nº veces que debe usarse
56 //un etiqueta antes de pasar a la siguiente
59 vector<TaggerWord> vwords;
61 vector<TaggerWord> vwords_before;
62 vector<TaggerWord> vwords_after;
66 static Segment* new_segment(MorphoStream &ms, TransferRules* tr, TaggerData &td);
68 int get_number_paths();
70 static void set_tag_index(map<wstring, TTag, Ltstr> ti);
72 wstring get_path(vector <TTag>& etqpart, int path);