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
39 char realWrd
[TAM_WORD
];
40 char comment
[TAM_LINE
];
41 char pos
[TAM_POS
],posOld
[TAM_POS
];
42 long double weight
,weightOld
;
43 struct stack_t
*stackScores
;
58 nodo
*index
,*beginWin
,*endWin
;
59 int lengthWin
,posIndex
,posBegin
,posEnd
;
67 int winAdd(char *wrd
, char *pos
);
69 int winLookRegExp2(void *er
,char *str
);
74 int winLookRegExp(char *m
);
75 int winMaterializePOSValues(int action
);
79 swindow(FILE *input
,int number
, int position
);
80 swindow(FILE *input
,int number
);
84 nodo
*get(int position
,int direction
);
87 void putLengthWin(int l
);
92 int winExistUnkWord(int direction
, dictionary
*d
);
94 void winPushWordFeature(void *ptr
,dictionary
*d
, struct stack_t
*pila
,int direction
);
95 void winPushPosFeature(void *ptr
,dictionary
*d
, struct stack_t
*pila
,int direction
);
96 void winPushAmbiguityFeature(void *ptr
,dictionary
*d
, struct stack_t
*pila
,int direction
);
97 void winPushMFTFeature(void *ptr
,dictionary
*d
, struct stack_t
*pila
,int direction
);
98 void winPushMaybeFeature(void *ptr
,dictionary
*d
, struct stack_t
*pila
,int direction
);
99 void winPushSwnFeature(struct stack_t
*pila
);
100 void winPushUnknownFeatures(char *str
, struct stack_t
*pila
);
102 void winPushSuffixFeature(char *wrd
, struct stack_t
*pila
,int longitud
);
103 void winPushPrefixFeature(char *wrd
, struct stack_t
*pila
,int longitud
);
104 //void winPushStartCapFeature(char *wrd, struct stack_t *pila);
105 void winPushAllUpFeature(char *wrd
,stack_t
*pila
);
106 void winPushAllLowFeature(char *wrd
,stack_t
*pila
);
107 void winPushContainCapFeature(char *wrd
, stack_t
*pila
);
108 void winPushContainCapsFeature(char *wrd
, stack_t
*pila
);
109 void winPushContainPeriodFeature(char *wrd
, stack_t
*pila
);
110 void winPushContainCommaFeature(char *wrd
, stack_t
*pila
);
111 void winPushContainNumFeature(char *wrd
, stack_t
*pila
);
112 void winPushMultiwordFeature(char *wrd
, stack_t
*pila
);
113 void winPushLetterFeature(char *, stack_t
*, int, int );
114 void winPushLenghtFeature(char *wrd
, stack_t
*pila
);
115 void winPushStartWithCapFeature(char *,stack_t
*);
116 void winPushStartWithLowerFeature(char *,stack_t
*);
117 void winPushStartWithNumberFeature(char *,stack_t
*);