Menu

problem with the use of language model tool kit

Help
tmt
2016-04-13
2016-04-13
  • tmt

    tmt - 2016-04-13

    I have downloaded the cmu lm tool kit version 2.05 (CMU-Cam_Toolkit_v2). I am working in ubuntu. Going to the src folder gave the command : sudo make install , as this is the step suggested for installation of the toolkit in the readme file, provided along with the tool.
    The make step resulted in the following error. please help me to solve this error.

    ~~~~~~~~~~~~~~~~~
    gcc -O -c -o bo_ng_prob.o bo_ng_prob.c
    gcc -O -c -o calc_mem_req.o calc_mem_req.c
    gcc -O -c -o compute_back_off.o compute_back_off.c
    gcc -O -c -o compute_discount.o compute_discount.c
    gcc -O -c -o compute_unigram.o compute_unigram.c
    gcc -O -c -o get_ngram.o get_ngram.c
    gcc -O -c -o increment_context.o increment_context.c
    gcc -O -c -o lookup_index_of.o lookup_index_of.c
    gcc -O -c -o short_indices.o short_indices.c
    gcc -O -c -o two_byte_alphas.o two_byte_alphas.c
    gcc -O -c -o write_lms.o write_lms.c
    gcc -O -c -o num_of_types.o num_of_types.c
    gcc -O -c -o guess_mem.o guess_mem.c
    gcc -O -c -o counts.o counts.c
    gcc -O -c -o arpa_bo_ng_prob.o arpa_bo_ng_prob.c
    gcc -O -c -o calc_prob_of.o calc_prob_of.c
    gcc -O -c -o decode_bo_case.o decode_bo_case.c
    gcc -O -c -o gen_fb_list.o gen_fb_list.c
    gcc -O -c -o load_lm.o load_lm.c
    load_lm.c: In function ‘load_arpa_lm’:
    load_lm.c:350:12: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result]
    fgets(in_line,1024,arpa_fp);
    ^
    load_lm.c:363:8: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result]
    fgets(in_line,1024,arpa_fp);
    ^
    load_lm.c:375:10: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result]
    fgets(in_line,1024,arpa_fp);
    ^
    load_lm.c:441:8: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result]
    fgets(in_line,1024,arpa_fp);
    ^
    load_lm.c:488:12: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result]
    fgets(in_line,1024,arpa_fp);
    ^
    load_lm.c:537:12: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result]
    fgets(in_line,1024,arpa_fp);
    ^
    load_lm.c:570:12: warning: ignoring return value of ‘fscanf’, declared with attribute warn_unused_result [-Wunused-result]
    fscanf(arpa_fp,"%s",temp_word[k]);
    ^
    load_lm.c:750:10: warning: ignoring return value of ‘fscanf’, declared with attribute warn_unused_result [-Wunused-result]
    fscanf(arpa_fp,"%s",temp_word[k]);
    ^
    gcc -O -c -o parse_comline.o parse_comline.c
    gcc -O -c -o perplexity.o perplexity.c
    gcc -O -c -o stats.o stats.c
    gcc -O -c -o validate.o validate.c
    gcc -O -c -o pc_libs/pc_comline.o pc_libs/pc_comline.c
    gcc -O -c -o pc_libs/pc_message.o pc_libs/pc_message.c
    pc_libs/pc_message.c: In function ‘pc_message’:
    pc_libs/pc_message.c:36:5: warning: passing argument 1 of ‘__builtin_va_end’ from incompatible pointer type [enabled by default]
    va_end(msg);
    ^
    pc_libs/pc_message.c:36:5: note: expected ‘struct __va_list_tag ’ but argument is of type ‘char
    gcc -O -c -o rr_libs/parse_line.o rr_libs/parse_line.c
    gcc -O -c -o rr_libs/quit.o rr_libs/quit.c
    rr_libs/quit.c: In function ‘quit’:
    rr_libs/quit.c:29:4: warning: passing argument 1 of __builtin_va_end from incompatible pointer type [enabled by default]
    va_end(msg) ;
    ^
    rr_libs/quit.c:29:4: note: expected ‘struct __va_list_tag ’ but argument is of type ‘char
    rr_libs/quit.c:30:4: warning: incompatible implicit declaration of built-in function ‘exit’ [enabled by default]
    exit(rc) ;
    ^
    gcc -O -c -o rr_libs/rd_wlist_arry.o rr_libs/rd_wlist_arry.c
    gcc -O -c -o rr_libs/read_voc.o rr_libs/read_voc.c
    gcc -O -c -o rr_libs/read_wlist_si.o rr_libs/read_wlist_si.c
    gcc -O -c -o rr_libs/rr_calloc.o rr_libs/rr_calloc.c
    gcc -O -c -o rr_libs/rr_feof.o rr_libs/rr_feof.c
    gcc -O -c -o rr_libs/rr_fexists.o rr_libs/rr_fexists.c
    gcc -O -c -o rr_libs/rr_filesize.o rr_libs/rr_filesize.c
    gcc -O -c -o rr_libs/rr_fopen.o rr_libs/rr_fopen.c
    gcc -O -c -o rr_libs/rr_fread.o rr_libs/rr_fread.c
    gcc -O -c -o rr_libs/rr_fseek.o rr_libs/rr_fseek.c
    gcc -O -c -o rr_libs/rr_fwrite.o rr_libs/rr_fwrite.c
    gcc -O -c -o rr_libs/rr_iopen.o rr_libs/rr_iopen.c
    gcc -O -c -o rr_libs/rr_malloc.o rr_libs/rr_malloc.c
    gcc -O -c -o rr_libs/rr_oopen.o rr_libs/rr_oopen.c
    gcc -O -c -o rr_libs/salloc.o rr_libs/salloc.c
    gcc -O -c -o rr_libs/sih.o rr_libs/sih.c
    rr_libs/sih.c: In function ‘sih_val_read_from_file’:
    rr_libs/sih.c:255:19: warning: comparison between pointer and integer [enabled by default]
    if (*pstring == NULL) {
    ^
    rm -f SLM2.a
    ar r SLM2.a bo_ng_prob.o calc_mem_req.o compute_back_off.o compute_discount.o compute_unigram.o get_ngram.o increment_context.o lookup_index_of.o short_indices.o two_byte_alphas.o write_lms.o num_of_types.o guess_mem.o counts.o arpa_bo_ng_prob.o bo_ng_prob.o calc_prob_of.o decode_bo_case.o gen_fb_list.o load_lm.o lookup_index_of.o parse_comline.o perplexity.o short_indices.o stats.o two_byte_alphas.o validate.o num_of_types.o counts.o load_lm.o write_lms.o short_indices.o two_byte_alphas.o num_of_types.o stats.o counts.o get_ngram.o pc_libs/pc_comline.o pc_libs/pc_message.o rr_libs/parse_line.o rr_libs/quit.o rr_libs/rd_wlist_arry.o rr_libs/read_voc.o rr_libs/read_wlist_si.o rr_libs/rr_calloc.o rr_libs/rr_feof.o rr_libs/rr_fexists.o rr_libs/rr_filesize.o rr_libs/rr_fopen.o rr_libs/rr_fread.o rr_libs/rr_fseek.o rr_libs/rr_fwrite.o rr_libs/rr_iopen.o rr_libs/rr_malloc.o rr_libs/rr_oopen.o rr_libs/salloc.o rr_libs/rr_malloc.o rr_libs/rr_oopen.o rr_libs/salloc.o rr_libs/sih.o
    ar: creating SLM2.a
    if [ uname = SunOS -o uname = Linux ] ; then ranlib SLM2.a ; fi
    gcc -O -o idngram2lm idngram2lm.c SLM2.a -lm
    gcc -O -o evallm evallm.c SLM2.a -lm
    evallm.c: In function ‘main’:
    evallm.c:69:4: warning: incompatible implicit declaration of built-in function ‘exit’ [enabled by default]
    exit(1);
    ^
    evallm.c:167:5: warning: ‘gets’ is deprecated (declared at /usr/include/x86_64-linux-gnu/bits/stdio2.h:233) [-Wdeprecated-declarations]
    gets(input_string);
    ^
    evallm.c:331:3: warning: incompatible implicit declaration of built-in function ‘exit’ [enabled by default]
    exit(0);
    ^
    evallm.c:167:9: warning: ignoring return value of ‘gets’, declared with attribute warn_unused_result [-Wunused-result]
    gets(input_string);
    ^
    /tmp/ccbX8Tbm.o: In function main': evallm.c:(.text+0x4af): warning: thegets' function is dangerous and should not be used.
    gcc -O -o text2wngram text2wngram.c SLM2.a -lm
    gcc -O -o text2idngram text2idngram.c SLM2.a -lm
    gcc -O -o binlm2arpa binlm2arpa.c SLM2.a -lm
    gcc -O -o ngram2mgram ngram2mgram.c SLM2.a -lm
    gcc -O -o idngram2stats idngram2stats.c SLM2.a -lm
    gcc -O -o wfreq2vocab wfreq2vocab.c SLM2.a -lm
    gcc -O -o text2wfreq text2wfreq.c SLM2.a -lm
    gcc -O -o wngram2idngram wngram2idngram.c SLM2.a -lm
    gcc -O -o mergeidngram mergeidngram.c SLM2.a -lm
    gcc -O -o interpolate interpolate.c SLM2.a -lm
    for i in idngram2lm evallm text2wngram text2idngram binlm2arpa ngram2mgram idngram2stats wfreq2vocab text2wfreq wngram2idngram mergeidngram interpolate; do \
    ./install-sh $i ../bin; \
    done
    ./install-sh SLM2.a ../lib
    ~~~~~~~~~~~~~~

     

    Last edit: Nickolay V. Shmyrev 2016-04-20
    • Nickolay V. Shmyrev

      I do not see any error here, those are jsut warnings. Tools were installed properly in bin folder.

      I recommend you to use SRILM, it is much more advanced than cmuclmtk.

      In case you insist I see you are using old version, I recommend you to update to a newer one.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.