Lingua::YaTeA::OptionSet - Perl extension for handling option set in YaTeA
use Lingua::YaTeA::OptionSet; Lingua::YaTeA::OptionSet->new();
This module provides methods for handling option set. The list of options is stored in the field OPTIONS.
OPTIONS
The method creates a empty option set. The list of options is stored in the field OPTIONS. It sets the default value defaultof the option suffix.
default
suffix
addOptionSet($options_set_h,$message_set,$display_language);
The method adds the options defined in a hashtable to the option set. $options_set_h is the reference to the hashtable of the options.
$options_set_h
The variables $message_set and $display_language are used for displaying a warning or error message.
$message_set
$display_language
addOption($name,$value,$message_set,$display_language);
The method add or updates the option $name with the value value.
$name
value
checkCompulsory($option_list)
This method checks if the options given in $option_list are defined in the option set.
$option_list
The variable $option_list is a string and contains the list of option names separated by commas.
is_disable($name);
The method indicates if the option $name is disable.
It returns 1 if the option is disable, 0 else.
1
0
is_enable($name);
The method indicates if the option $name is enable.
It returns 1 if the option is enable, 0 else.
oprionExists($name);
The method indicates if the option $name exists.
It returns the object if the option exists, 0 else.
getOption($name);
The method returns the option object referred by $nameif the option name exists, or die.
getOptions();
The method returns the hashtable of the options.
getLanguage();
The method returns the value of the language option.
language
getChainedLinks();
The method returns the value 1 if the option named chained-links is set, 0 else.
chained-links
getSentenceBoundary();
The method returns the value of the SENTENCE_BONDARY option.
SENTENCE_BONDARY
getDocumentBoundary();
The method returns the value of the DOCUMENT_BONDARY option.
DOCUMENT_BONDARY
getParsingDirection();
The method returns the value of the PARSING_DIRECTION option.
PARSING_DIRECTION
MatchTypeValue();
The method returns the value of the match-type option.
match-type
readFromFile($file);
The method reads the configuration file and set the options defined is the DefaultConfig section. The option PHRASE_MAXIMUM_LENGTH is checked and set to a default value if the option is not specified in the configuration file.
DefaultConfig
PHRASE_MAXIMUM_LENGTH
The configuration file $file is a Lingua::YaTeA::File object.
$file
Lingua::YaTeA::File
checkMaxLength();
The method checks if the option PHRASE_MAXIMUM_LENGTH is set in the configuration and sets it to a default value (12).
12
getMaxLength();
The method returns the value of the PHRASE_MAXIMUM_LENGTH option.
getCompulsory();
The method returns the value of the COMPULSORY_ITEM option.
COMPULSORY_ITEM
getSuffix();
The method returns the value of the suffix option.
getDisplayLanguage();
The method returns the value of the MESSAGE_DISPLAY option.
MESSAGE_DISPLAY
getDefaultOutput();
The method returns the value of the default_output option.
default_output
setMatchType($match_type);
The method adds or updates the type of matching $match_type) i.e. the option match-type.
$match_type
The method returns the value of the termList option.
termList
The method returns the value of the TTG-style-term-candidates option.
TTG-style-term-candidates
The method returns the value of the output-path option.
output-path
setDefaultOutputPath();
The method sets the current directory (".") as default output directory if the option is not output-path.
.
disable($option_name,$message_set,$display_language);
The methods disables the option $option_name.
$option_name
enable($option_name,$option_value,$message_set,$display_language);
The method enables the option $option_name with the value $option_value if the option does not exist.
$option_value
handleOptionDependencies($message_set);
The method checks the dependencies between the options.
Options TC-for-BioLG and debug are incompatibles, while both the options termino and match-type with the value strict must be specified.
TC-for-BioLG
debug
termino
strict
Sophie Aubin and Thierry Hamon. Improving Term Extraction with Terminological Resources. In Advances in Natural Language Processing (5th International Conference on NLP, FinTAL 2006). pages 380-387. Tapio Salakoski, Filip Ginter, Sampo Pyysalo, Tapio Pahikkala (Eds). August 2006. LNAI 4139.
Thierry Hamon <thierry.hamon@univ-paris13.fr> and Sophie Aubin <sophie.aubin@lipn.univ-paris13.fr>
Copyright (C) 2005 by Thierry Hamon and Sophie Aubin
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.6 or, at your option, any later version of Perl 5 you may have available.
To install Lingua::YaTeA, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Lingua::YaTeA
CPAN shell
perl -MCPAN -e shell install Lingua::YaTeA
For more information on module installation, please visit the detailed CPAN module installation guide.