NAME

Lingua::YaTeA::OptionSet - Perl extension for handling option set in YaTeA

SYNOPSIS

use Lingua::YaTeA::OptionSet;
Lingua::YaTeA::OptionSet->new();

DESCRIPTION

This module provides methods for handling option set. The list of options is stored in the field OPTIONS.

METHODS

new()

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.

addOptionSet()

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.

The variables $message_set and $display_language are used for displaying a warning or error message.

addOption()

addOption($name,$value,$message_set,$display_language);

The method add or updates the option $name with the value value.

The variables $message_set and $display_language are used for displaying a warning or error message.

checkCompulsory()

checkCompulsory($option_list)

This method checks if the options given in $option_list are defined in the option set.

The variable $option_list is a string and contains the list of option names separated by commas.

is_disable()

is_disable($name);

The method indicates if the option $name is disable.

It returns 1 if the option is disable, 0 else.

is_enable()

is_enable($name);

The method indicates if the option $name is enable.

It returns 1 if the option is enable, 0 else.

optionExists()

oprionExists($name);

The method indicates if the option $name exists.

It returns the object if the option exists, 0 else.

getOption()

getOption($name);

The method returns the option object referred by $nameif the option name exists, or die.

getOptions()

getOptions();

The method returns the hashtable of the options.

getLanguage()

getLanguage();

The method returns the value of the language option.

getChainedLinks()

getChainedLinks();

The method returns the value 1 if the option named chained-links is set, 0 else.

getSentenceBoundary()

getSentenceBoundary();

The method returns the value of the SENTENCE_BONDARY option.

getDocumentBoundary()

getDocumentBoundary();

The method returns the value of the DOCUMENT_BONDARY option.

getParsingDirection()

getParsingDirection();

The method returns the value of the PARSING_DIRECTION option.

MatchTypeValue()

MatchTypeValue();

The method returns the value of the match-type option.

readFromFile()

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.

The configuration file $file is a Lingua::YaTeA::File object.

checkMaxLength()

checkMaxLength();

The method checks if the option PHRASE_MAXIMUM_LENGTH is set in the configuration and sets it to a default value (12).

getMaxLength()

getMaxLength();

The method returns the value of the PHRASE_MAXIMUM_LENGTH option.

getCompulsory()

getCompulsory();

The method returns the value of the COMPULSORY_ITEM option.

getSuffix()

getSuffix();

The method returns the value of the suffix option.

getDisplayLanguage()

getDisplayLanguage();

The method returns the value of the MESSAGE_DISPLAY option.

getDefaultOutput()

getDefaultOutput();

The method returns the value of the default_output option.

setMatchType()

setMatchType($match_type);

The method adds or updates the type of matching $match_type) i.e. the option match-type.

getTermListStyle()

The method returns the value of the termList option.

getTTGStyle()

The method returns the value of the TTG-style-term-candidates option.

getOutputPath()

The method returns the value of the output-path option.

setDefaultOutputPath()

setDefaultOutputPath();

The method sets the current directory (".") as default output directory if the option is not output-path.

disable()

disable($option_name,$message_set,$display_language);

The methods disables the option $option_name.

The variables $message_set and $display_language are used for displaying a warning or error message.

enable()

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.

The variables $message_set and $display_language are used for displaying a warning or error message.

handleOptionDependencies()

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.

SEE ALSO

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.

AUTHOR

Thierry Hamon <thierry.hamon@univ-paris13.fr> and Sophie Aubin <sophie.aubin@lipn.univ-paris13.fr>

COPYRIGHT AND LICENSE

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.