2 * Copyright (C) 2004 Jesus Gimenez, Lluis Marquez and Senen Moya
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24 #define EMPTY_WORD "_"
25 #define EMPTY_POS "??"
27 #define LEFT_TO_RIGHT 1
28 #define RIGHT_TO_LEFT 2
30 #define RESET_VALUES 1
33 #define COUNTING_FROM_END 111
34 #define COUNTING_FROM_BEGIN 222
40 char realWrd
[TAM_WORD
];
41 char comment
[TAM_LINE
];
42 char pos
[TAM_POS
],posOld
[TAM_POS
];
43 long double weight
,weightOld
;
44 struct stack_t
*stackScores
;
59 nodo
*index
,*beginWin
,*endWin
;
60 int lengthWin
,posIndex
,posBegin
,posEnd
;
68 int winAdd(char *wrd
, char *pos
);
70 int winLookRegExp2(void *er
,char *str
);
75 int winLookRegExp(char *m
);
76 int winMaterializePOSValues(int action
);
80 swindow(FILE *input
,int number
, int position
);
81 swindow(FILE *input
,int number
);
85 nodo
*get(int position
,int direction
);
88 void putLengthWin(int l
);
93 int winExistUnkWord(int direction
, dictionary
*d
);
95 void winPushWordFeature(void *ptr
,dictionary
*d
, struct stack_t
*pila
,int direction
);
96 void winPushPosFeature(void *ptr
,dictionary
*d
, struct stack_t
*pila
,int direction
);
97 void winPushAmbiguityFeature(void *ptr
,dictionary
*d
, struct stack_t
*pila
,int direction
);
98 void winPushMFTFeature(void *ptr
,dictionary
*d
, struct stack_t
*pila
,int direction
);
99 void winPushMaybeFeature(void *ptr
,dictionary
*d
, struct stack_t
*pila
,int direction
);
100 void winPushSwnFeature(struct stack_t
*pila
);
101 void winPushUnknownFeatures(char *str
, struct stack_t
*pila
);
103 void winPushSuffixFeature(char *wrd
, struct stack_t
*pila
,int longitud
);
104 void winPushPrefixFeature(char *wrd
, struct stack_t
*pila
,int longitud
);
105 //void winPushStartCapFeature(char *wrd, struct stack_t *pila);
106 void winPushAllUpFeature(char *wrd
,stack_t
*pila
);
107 void winPushAllLowFeature(char *wrd
,stack_t
*pila
);
108 void winPushContainCapFeature(char *wrd
, stack_t
*pila
);
109 void winPushContainCapsFeature(char *wrd
, stack_t
*pila
);
110 void winPushContainPeriodFeature(char *wrd
, stack_t
*pila
);
111 void winPushContainCommaFeature(char *wrd
, stack_t
*pila
);
112 void winPushContainNumFeature(char *wrd
, stack_t
*pila
);
113 void winPushMultiwordFeature(char *wrd
, stack_t
*pila
);
114 void winPushLetterFeature(char *, stack_t
*, int, int );
115 void winPushLenghtFeature(char *wrd
, stack_t
*pila
);
116 void winPushStartWithCapFeature(char *,stack_t
*);
117 void winPushStartWithLowerFeature(char *,stack_t
*);
118 void winPushStartWithNumberFeature(char *,stack_t
*);