NAME

Treex::Core::Config - centralized info about Treex configuration

VERSION

version 2.20210102

SYNOPSIS

use Treex::Core::Config;
print "TrEd in available in " . Treex::Core::Config->tred_dir() . "\n";
print "PML schema is available in " . Treex::Core::Config->pml_schema_dir() . "\n";

DESCRIPTION

This module provides information about the current installed Treex framework, for instance paths to its components. By default the configuration is stored in $HOME/.treex/config.yaml. You can specify an alternative directory for config.yaml by setting the $TREEX_CONFIG environment variable. You can edit config.yaml, so it suits your needs.

METHODS

Following methods returns values which are present in config file

resource_path()

return list of directories where resources will be searched

tmp_dir()

return temporary directory, should be used instead of /tmp or similar

share_dir()

returns the Treex shared directory (formerly $TMT_SHARE)

share_url()

returns base url from shared data are downloaded

pml_schema_dir()

return the directory in which the PML schemata for .treex files are located

tred_dir()

the directory in which the tree editor TrEd is installed

tred_extension_dir()

the directory in which the TrEd extension for Treex files is stored

Rest of methods is not configurable by config file

config_dir()

returns directory where configuration of Treex will reside (currently just path file)

default_resource_dir()

returns default path for resources, it uses dist data for Treex-Core and if $TMT_ROOT variable set also $TMT_ROOT/share

_devel_version()

returns true iff the current Treex instance is running from the svn working copy (which means that it is the development version, not installed from CPAN)

lib_core_dir()

returns the directory in which this module is located (and where the other Treex::Core modules are expected too)

AUTHOR

Zdeněk Žabokrtský <zabokrtsky@ufal.mff.cuni.cz>

Tomáš Kraut <kraut@ufal.mff.cuni.cz>

COPYRIGHT AND LICENSE

Copyright © 2011 by Institute of Formal and Applied Linguistics, Charles University in Prague

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.