5 |
This program is free software; you can redistribute it and/or |
This program is free software; you can redistribute it and/or |
6 |
modify it under the terms of the GNU General Public License |
modify it under the terms of the GNU General Public License |
7 |
as published by the Free Software Foundation; either version 2 |
as published by the Free Software Foundation; either version 2 |
8 |
of the License, or (at your option) any later version. This |
of the License, or (at your option) any later version. This |
9 |
program is distributed in the hope that it will be useful, |
program is distributed in the hope that it will be useful, |
10 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 |
GNU General Public License for more details. You should have |
GNU General Public License for more details. You should have |
13 |
received a copy of the GNU General Public License |
received a copy of the GNU General Public License |
14 |
along with this program; if not, write to the Free Software |
along with this program; if not, write to the Free Software |
15 |
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
16 |
USA. |
USA. |
17 |
|
|
18 |
Author: |
Author: |
19 |
LAGACHERIE Matthieu |
LAGACHERIE Matthieu |
20 |
Paper mail : 7 rue Delescluzes 94280 LE KREMLIN BICETRE, FRANCE |
Paper mail : 7 rue Delescluzes 94280 LE KREMLIN BICETRE, FRANCE |
21 |
E-mail : matthieu@marvinproject.org |
E-mail : matthieu@marvinproject.org |
22 |
|
|
23 |
RICORDEAU Olivier |
RICORDEAU Olivier |
24 |
Paper mail : 69 avenue d'Italie 75013 PARIS, FRANCE |
Paper mail : 69 avenue d'Italie 75013 PARIS, FRANCE |
28 |
|
|
29 |
|
|
30 |
(** The class Corpus of the LibNN |
(** The class Corpus of the LibNN |
31 |
|
|
32 |
@author Matthieu Lagacherie |
@author Matthieu Lagacherie |
33 |
@author Olivier Ricordeau |
@author Olivier Ricordeau |
34 |
|
|
35 |
*) |
*) |
36 |
|
|
37 |
class corpus = |
class ['a] corpus = |
38 |
object |
object |
39 |
val mutable _patterns = [] |
val mutable _patterns = [] |
40 |
|
|
41 |
method getPatterns = _patterns |
method getPatterns = _patterns |
42 |
|
|
43 |
method getPattern index = List.nth _patterns index |
method getPattern index = List.nth _patterns index |
44 |
|
|
45 |
method getPatternNumber = List.length _patterns |
method getPatternNumber = List.length _patterns |
46 |
|
|
47 |
|
method addPattern (pattern : 'a) = List.append _patterns pattern |
48 |
|
|
49 |
end |
end |