Naprawy dotyczace oblugi plikow konfiguracyjnych.
This commit is contained in:
parent
2ff1f65f9b
commit
cfdf333a51
10
Makefile
10
Makefile
@ -18,7 +18,6 @@ all: $(TARGETS)
|
|||||||
.PHONY: components
|
.PHONY: components
|
||||||
components:
|
components:
|
||||||
cd $(SRC_DIR)/lib && make; cd $(CUR_DIR)
|
cd $(SRC_DIR)/lib && make; cd $(CUR_DIR)
|
||||||
|
|
||||||
@for cmp in $(COMPONENTS); do\
|
@for cmp in $(COMPONENTS); do\
|
||||||
cd $(SRC_DIR)/$$cmp && make; cd $(CUR_DIR); \
|
cd $(SRC_DIR)/$$cmp && make; cd $(CUR_DIR); \
|
||||||
done
|
done
|
||||||
@ -29,6 +28,7 @@ documentation:
|
|||||||
|
|
||||||
.PHONY: configuration
|
.PHONY: configuration
|
||||||
configuration:
|
configuration:
|
||||||
|
cd $(CUR_DIR)/conf && make; cd $(CUR_DIR)
|
||||||
|
|
||||||
.PHONY: libraries
|
.PHONY: libraries
|
||||||
libraries:
|
libraries:
|
||||||
@ -40,7 +40,7 @@ share:
|
|||||||
# cleanup section
|
# cleanup section
|
||||||
# ------------------------------------------------------------------
|
# ------------------------------------------------------------------
|
||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
clean: clean_components clean_documentation
|
clean: clean_components clean_documentation clean_config
|
||||||
@echo "All files cleaned successfully!"
|
@echo "All files cleaned successfully!"
|
||||||
|
|
||||||
.PHONY: clean_components
|
.PHONY: clean_components
|
||||||
@ -54,12 +54,16 @@ clean_components:
|
|||||||
clean_documentation:
|
clean_documentation:
|
||||||
cd $(CUR_DIR)/doc && make clean; cd $(CUR_DIR)
|
cd $(CUR_DIR)/doc && make clean; cd $(CUR_DIR)
|
||||||
|
|
||||||
|
.PHONY: clean_config
|
||||||
|
clean_config:
|
||||||
|
cd $(CUR_DIR)/conf && make clean; cd $(CUR_DIR)
|
||||||
|
|
||||||
# ------------------------------------------------------------------
|
# ------------------------------------------------------------------
|
||||||
# install section
|
# install section
|
||||||
# ------------------------------------------------------------------
|
# ------------------------------------------------------------------
|
||||||
.PHONY: install
|
.PHONY: install
|
||||||
install: all install_dirs install_components install_configuration install_libraries install_documentation install_share
|
install: all install_dirs install_components install_configuration install_libraries install_documentation install_share
|
||||||
|
|
||||||
.PHONY: install_dirs
|
.PHONY: install_dirs
|
||||||
install_dirs:
|
install_dirs:
|
||||||
install -d $(PREFIX) \
|
install -d $(PREFIX) \
|
||||||
|
@ -1,5 +1,16 @@
|
|||||||
include ../config.mak
|
include ../config.mak
|
||||||
|
|
||||||
|
.PHONY: all
|
||||||
|
all: compiledic.conf cor.conf dgc.conf dgp.conf gph.conf grp.conf gue.conf kor.conf lem.conf mar.conf ser.conf utt.conf
|
||||||
|
|
||||||
|
%.conf: %.conf.m4
|
||||||
|
m4 --define=LANG_DIR=${LANG_DIR} --define=LIB_DIR=${LIB_DIR} $< > $@
|
||||||
|
|
||||||
|
|
||||||
|
.PHONY: clean
|
||||||
|
clean:
|
||||||
|
rm *.conf
|
||||||
|
|
||||||
.PHONY: install
|
.PHONY: install
|
||||||
install:
|
install:
|
||||||
ifdef CONF_DIR
|
ifdef CONF_DIR
|
||||||
|
13
conf/compiledic.conf.m4
Normal file
13
conf/compiledic.conf.m4
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
# ************************************************************
|
||||||
|
# * This file was created automatically during installation. *
|
||||||
|
# * If you don't need do not change it. *
|
||||||
|
# * *
|
||||||
|
# * UAM Text Tools *
|
||||||
|
# * Adam Mickiewicz University, Poland *
|
||||||
|
# * http://utt.amu.edu.pl *
|
||||||
|
# ************************************************************
|
||||||
|
#
|
||||||
|
# All lines must looks like:
|
||||||
|
# parameter_name [=] value
|
||||||
|
#
|
||||||
|
symbols = LANG_DIR/pl_PL.ISO-8859-2/pl_PL.ISO-8859-2.sym
|
@ -10,5 +10,5 @@
|
|||||||
# All lines must looks like:
|
# All lines must looks like:
|
||||||
# parameter_name [=] value
|
# parameter_name [=] value
|
||||||
#
|
#
|
||||||
dictionary-home = PATH_PREFIX/share/utt
|
dictionary-home = LANG_DIR
|
||||||
process = W
|
process = W
|
@ -1,15 +0,0 @@
|
|||||||
# ************************************************************
|
|
||||||
# * This file was created automatically during installation. *
|
|
||||||
# * If you don't need do not change it. *
|
|
||||||
# * *
|
|
||||||
# * UAM Text Tools *
|
|
||||||
# * Adam Mickiewicz University, Poland *
|
|
||||||
# * http://utt.amu.edu.pl *
|
|
||||||
# ************************************************************
|
|
||||||
#
|
|
||||||
# All lines must looks like:
|
|
||||||
# parameter_name [=] value
|
|
||||||
#
|
|
||||||
categories = PATH_PREFIX/share/utt/cats.dgc
|
|
||||||
grammar = PATH_PREFIX/share/utt/gram.dgc
|
|
||||||
outputfile = PATH_PREFIX/share/utt/gram.dgp
|
|
@ -10,4 +10,6 @@
|
|||||||
# All lines must looks like:
|
# All lines must looks like:
|
||||||
# parameter_name [=] value
|
# parameter_name [=] value
|
||||||
#
|
#
|
||||||
symbols = PATH_PREFIX/share/utt/pl_PL.ISO-8859-2/pl_PL.ISO-8859-2.sym
|
categories = LANG_DIR/cats.dgc
|
||||||
|
grammar = LANG_DIR/gram.dgc
|
||||||
|
outputfile = LANG_DIR/gram.dgp
|
@ -11,7 +11,7 @@
|
|||||||
# parameter_name [=] value
|
# parameter_name [=] value
|
||||||
#
|
#
|
||||||
|
|
||||||
grammar = PATH_PREFIX/share/utt/gram.dgp
|
grammar = LANG_DIR/gram.dgp
|
||||||
process = W
|
process = W
|
||||||
process = BOS
|
process = BOS
|
||||||
process = EOS
|
process = EOS
|
@ -10,6 +10,6 @@
|
|||||||
# All lines must looks like:
|
# All lines must looks like:
|
||||||
# parameter_name [=] value
|
# parameter_name [=] value
|
||||||
#
|
#
|
||||||
macros = PATH_PREFIX/lib/utt/terms.m4
|
macros = LIB_DIR/terms.m4
|
||||||
tags=uam
|
tags=uam
|
||||||
|
|
@ -10,5 +10,5 @@
|
|||||||
# All lines must looks like:
|
# All lines must looks like:
|
||||||
# parameter_name [=] value
|
# parameter_name [=] value
|
||||||
#
|
#
|
||||||
dictionary-home = PATH_PREFIX/share/utt
|
dictionary-home = LANG_DIR
|
||||||
process = W
|
process = W
|
@ -10,7 +10,7 @@
|
|||||||
# All lines must looks like:
|
# All lines must looks like:
|
||||||
# parameter_name [=] value
|
# parameter_name [=] value
|
||||||
#
|
#
|
||||||
dictionary-home = PATH_PREFIX/share/utt
|
dictionary-home = LANG_DIR
|
||||||
weights = PATH_PREFIX/share/utt/weights.kor
|
weights = LANG_DIR/weights.kor
|
||||||
threshold = 1.0
|
threshold = 1.0
|
||||||
process=W
|
process=W
|
@ -10,5 +10,5 @@
|
|||||||
# All lines must looks like:
|
# All lines must looks like:
|
||||||
# parameter_name [=] value
|
# parameter_name [=] value
|
||||||
#
|
#
|
||||||
dictionary-home = PATH_PREFIX/share/utt
|
dictionary-home = LANG_DIR
|
||||||
process = W
|
process = W
|
@ -10,6 +10,6 @@
|
|||||||
# All lines must looks like:
|
# All lines must looks like:
|
||||||
# parameter_name [=] value
|
# parameter_name [=] value
|
||||||
#
|
#
|
||||||
macros = PATH_PREFIX/lib/utt/terms.m4
|
macros = LIB_DIR/terms.m4
|
||||||
tags=uam
|
tags=uam
|
||||||
|
|
@ -1,15 +0,0 @@
|
|||||||
# ************************************************************
|
|
||||||
# * This file was created automatically during installation. *
|
|
||||||
# * If you don't need do not change it. *
|
|
||||||
# * *
|
|
||||||
# * UAM Text Tools *
|
|
||||||
# * Adam Mickiewicz University, Poland *
|
|
||||||
# * http://utt.amu.edu.pl *
|
|
||||||
# ************************************************************
|
|
||||||
#
|
|
||||||
# All lines must looks like:
|
|
||||||
# parameter_name [=] value
|
|
||||||
#
|
|
||||||
macros = PATH_PREFIX/lib/utt/terms.m4
|
|
||||||
flex-template = PATH_PREFIX/lib/utt/ser.l.template
|
|
||||||
tags=uam
|
|
15
conf/ser.conf.m4
Normal file
15
conf/ser.conf.m4
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
# ************************************************************
|
||||||
|
# * This file was created automatically during installation. *
|
||||||
|
# * If you don't need do not change it. *
|
||||||
|
# * *
|
||||||
|
# * UAM Text Tools *
|
||||||
|
# * Adam Mickiewicz University, Poland *
|
||||||
|
# * http://utt.amu.edu.pl *
|
||||||
|
# ************************************************************
|
||||||
|
#
|
||||||
|
# All lines must looks like:
|
||||||
|
# parameter_name [=] value
|
||||||
|
#
|
||||||
|
macros = LIB_DIR/terms.m4
|
||||||
|
flex-template = LIB_DIR/ser.l.template
|
||||||
|
tags=uam
|
@ -108,6 +108,7 @@ extern void process_config_files(gengetopt_args_info* args, char* argv0)
|
|||||||
|
|
||||||
// obsluga systemowego pliku konfiguracyjnego dla programu
|
// obsluga systemowego pliku konfiguracyjnego dla programu
|
||||||
sprintf(config_file, "%s/%s.conf", SYSTEM_CONFIG_DIR, program_name);
|
sprintf(config_file, "%s/%s.conf", SYSTEM_CONFIG_DIR, program_name);
|
||||||
|
|
||||||
if (file_accessible(config_file) == 0) {
|
if (file_accessible(config_file) == 0) {
|
||||||
if (cmdline_parser_configfile(config_file,
|
if (cmdline_parser_configfile(config_file,
|
||||||
args,
|
args,
|
||||||
|
@ -0,0 +1,2 @@
|
|||||||
|
common.o: ../common/common.cc ../common/common.h ../common/../lib/const.h \
|
||||||
|
../common/../dgp/cmdline.h
|
@ -1,3 +1,5 @@
|
|||||||
|
include ../../config.mak
|
||||||
|
|
||||||
LDFLAGS += -static
|
LDFLAGS += -static
|
||||||
CXXFLAGS += -O2 -fpermissive
|
CXXFLAGS += -O2 -fpermissive
|
||||||
|
|
||||||
@ -39,7 +41,14 @@ clean: clean.cmdline
|
|||||||
clean.cmdline:
|
clean.cmdline:
|
||||||
rm cmdline.* || true
|
rm cmdline.* || true
|
||||||
|
|
||||||
copy:
|
.PHONY: install
|
||||||
ifdef UTT_BIN_DIR
|
install:
|
||||||
cp lem $(UTT_BIN_DIR)
|
ifdef BIN_DIR
|
||||||
|
install -m 0755 lem $(BIN_DIR)
|
||||||
|
endif
|
||||||
|
|
||||||
|
.PHONY: uninstall
|
||||||
|
uninstall:
|
||||||
|
ifdef BIN_DIR
|
||||||
|
rm $(BIN_DIR)/lem
|
||||||
endif
|
endif
|
||||||
|
@ -32,7 +32,7 @@ int main(int argc, char** argv) {
|
|||||||
else if(strcmp(dictionary+strlen(dictionary)-4,".dic")==0)
|
else if(strcmp(dictionary+strlen(dictionary)-4,".dic")==0)
|
||||||
lem = new AuxLem(dictionary);
|
lem = new AuxLem(dictionary);
|
||||||
else
|
else
|
||||||
fprintf(stderr,"lem: Invalid dictionary file extension.\n");
|
fprintf(stderr,"lem: Dictionary file not found.\n");
|
||||||
|
|
||||||
Words tab;
|
Words tab;
|
||||||
// Segment seg;
|
// Segment seg;
|
||||||
|
@ -20,5 +20,5 @@
|
|||||||
#define GUESS_DICT_FILE "slownik.fsa"
|
#define GUESS_DICT_FILE "slownik.fsa"
|
||||||
|
|
||||||
// katalogi z plikami konfiguracyjnymi
|
// katalogi z plikami konfiguracyjnymi
|
||||||
#define SYSTEM_CONFIG_DIR "/usr/local/etc/utt"
|
#define SYSTEM_CONFIG_DIR "/etc/utt"
|
||||||
#define USER_CONFIG_DIR "~/.utt"
|
#define USER_CONFIG_DIR "~/.utt"
|
||||||
|
Loading…
Reference in New Issue
Block a user