Problem running Python example

102 views
Skip to first unread message

Corey Thompson

unread,
Aug 11, 2015, 4:53:17 PM8/11/15
to link-grammar
Hello!

I recently cloned https://github.com/opencog/link-grammar and ran through the install instructions.

However, when I attempt to run the python example, I am receiving the following error:


me@thepc:~/projects/link-grammar/bindings/python-examples$ ./example.py
Traceback (most recent call last):
 
File "./example.py", line 8, in <module>
   
import linkgrammar
 
File "/usr/local/lib/python2.7/dist-packages/linkgrammar/__init__.py", line 6, in <module>
   
from .linkgrammar import *
 
File "/usr/local/lib/python2.7/dist-packages/linkgrammar/linkgrammar.py", line 8, in <module>
   
import _clinkgrammar as clg
ImportError: /usr/local/lib/python2.7/dist-packages/linkgrammar/_clinkgrammar.so: undefined symbol: dictionary_get_lang

Am I missing a package or environment setting? Any pointers for where to look / how to fix are appreciated!

Corey

Linas Vepstas

unread,
Aug 11, 2015, 5:29:55 PM8/11/15
to link-grammar
Hi Corey,

I guess there are several things to check. make sure that
liblink-grammar.so can be found: e.g make sure that /usr/local/lib is
in ld.so.conf . Make sure you ran ldconfig after installing. You
can work around this by setting LD_LIBRARY_PATH Google will tell you
more about these. Mostly: did you remember to say "make install"
after compiling?

--linas
> --
> You received this message because you are subscribed to the Google Groups
> "link-grammar" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to link-grammar...@googlegroups.com.
> To post to this group, send email to link-g...@googlegroups.com.
> Visit this group at http://groups.google.com/group/link-grammar.
> For more options, visit https://groups.google.com/d/optout.

ami...@gmail.com

unread,
Aug 11, 2015, 8:38:18 PM8/11/15
to link-grammar, linasv...@gmail.com
Most probably "make install" will cause it to run.
Since I don't usually have LG installed in my system (I run several different versions at once,
for test, and installing it may cause a confusion), I run it with:

PYTHONPATH=$LG_SRCDIR/bindings/python:$LG_BINDIR/bindings/pythonr/.libs   python binding/python-examples/example.py

when LG_SRCDIR is the sources directory and LG_BINDIR is the binary directory.
If you compile LG in its source directory (the usual thing), you don't need the second component (after the colon).

However, when example.py actually runs, it prints this error:

TypeError: object of type 'generator' has no len()

This happens because it still uses the pre-5.3 python binding.
After I converted it to use the new (i.e. current)  binding, I found two problems:

1. A bug in the postscript function binding, which I fixed.

2. Using of len() is problematic in the current binding: Since the linkage is now an iterator,
there is now a need to compute all the linkages in order to find their number,
even though the library knows this number just after the parsing, before even calculating the first linkage.
This doesn't make too much sense.
It is not too easy to fix that when using iterators, but I have an idea how to define
Sentence.num_valid_linkages() which will be valid after calling to parse() and before starting to iterate the linkages.

I will send patches to fix all of that.

Amir

ami...@gmail.com

unread,
Aug 12, 2015, 2:07:55 PM8/12/15
to link-grammar, linasv...@gmail.com
Hello Corey and Linas,

I have just sent the said patches.


Amir

Corey Thompson

unread,
Aug 12, 2015, 3:46:25 PM8/12/15
to link-grammar, linasv...@gmail.com
Thanks Linas and Amir!

Tomorrow morning I will double-check the make install and ldconfig steps first, then patch with Amir's PR and let you know how it goes.

Thanks so much for the quick responses!!
Corey

Corey Thompson

unread,
Aug 18, 2015, 9:21:09 PM8/18/15
to link-grammar, linasv...@gmail.com
Hi guys.  After double-checking Linas' steps, and pulling Amir's changes, I am still having the same issue:


I also made sure to:
1. make sure that liblink-grammar.so can be found:  e.g make sure that /usr/local/lib is in ld.so.conf 
Yes, ld.so.conf points to the files in /etc/ld.so.conf.d, In there is libc.conf, which includes the /usr/local/lib path.
 
2. Make sure you ran ldconfig after installing.  
Did that.

3. You can work around this by setting LD_LIBRARY_PATH  Google will tell you more about these.
See below in the .bashrc text.

4. Mostly: did you remember to say "make install" after compiling?
Yes, and did make clean, make, make install after setting all of the paths.

Here is the error again:
>>> import linkgrammar 
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.7/dist-packages/linkgrammar/__init__.py", line 6, in <module>
    from .linkgrammar import *
  File "/usr/local/lib/python2.7/dist-packages/linkgrammar/linkgrammar.py", line 8, in <module>
    import _clinkgrammar as clg
ImportError: /usr/local/lib/python2.7/dist-packages/linkgrammar/_clinkgrammar.so: undefined symbol: dictionary_get_lang

Notice that I can run link-parser directly:
ubuntu@ubuntu-pc:~/projects/link-grammar/link-parser$ ./link-parser 
link-grammar: Info: Dictionary found at ../data/en/4.0.dict
link-grammar: Info: Using locale en_US.UTF-8.
link-grammar: Info: Dictionary version 5.3.0.
link-grammar: Info: Library version link-grammar-5.3.0. Enter "!help" for help.

I am making sure the files can be found in the LD_LIBRARY_PATH.  from .bashrc:
export LG_LIB_PATH=/usr/local/lib:/usr/local/lib/python2.7/dist-packages/linkgrammar:/usr/local/lib/perl/5.18.2
export LD_LIBRARY_PATH=/usr/local/cuda-7.0/lib64:$LG_LIB_PATH:$LD_LIBRARY_PATH
export LD_RUN_PATH=$LG_LIB_PATH

Thoughts?

Thanks again!
Corey



On Wednesday, August 12, 2015 at 1:07:55 PM UTC-5, ami...@gmail.com wrote:

Linas Vepstas

unread,
Aug 18, 2015, 9:29:05 PM8/18/15
to Corey Thompson, link-grammar
On Tue, Aug 18, 2015 at 8:21 PM, Corey Thompson <cor...@gmail.com> wrote:
> /usr/local/lib/python2.7/dist-packages/linkgrammar/_clinkgrammar.so

Any chance you have a second copy of link-grammar installed, for
example, because you installed abiword, which uses an older version
for grammar checking?

You can do this:
ldd
/usr/local/lib/python2.7/dist-packages/linkgrammar/_clinkgrammar.so

which should print out liblink-grammar.so.5 =>
/usr/local/lib/liblink-grammar.so.5 and if it prints something else,
its a problem.

If above works, then another thing is to check

nm /usr/local/lib/liblink-grammar.so.5 |grep dictionary_get_lang

which should print an address, the letter T and dictionary_get_lang

--linas
Message has been deleted

Linas Vepstas

unread,
Aug 18, 2015, 9:42:17 PM8/18/15
to Corey Thompson, link-grammar
Yeah, has to be version 5 not version 4. Here: your ldd reports the problem:

liblink-grammar.so.4 => /usr/lib/liblink-grammar.so.4

The copy of version 4 in /usr/lib/ is hiding version 5 in /usr/local/lib

The copy in /usr/lib was installed by the base OS. I think you said
you are running ubuntu, right? Do this

dpkg -S /usr/lib/liblink-grammar.so.4 the -S means search and it
should print the name of the package that installed the file.
Uninstall that package, and things should work: apt-get purge <name
of package>

--linas

On Tue, Aug 18, 2015 at 8:34 PM, Corey Thompson <cor...@gmail.com> wrote:
>
>
> ubuntu@ubuntu-pc:/tmp$ ldd
> /usr/local/lib/python2.7/dist-packages/linkgrammar/_clinkgrammar.so
> linux-vdso.so.1 => (0x00007fffd0170000)
> libpython2.7.so.1.0 => /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
> (0x00007f2f586a0000)
> liblink-grammar.so.4 => /usr/lib/liblink-grammar.so.4 (0x00007f2f58458000)
> libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6
> (0x00007f2f58150000)
> libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f2f57d88000)
> libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f2f57b70000)
> libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0
> (0x00007f2f57950000)
> libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f2f57730000)
> libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f2f57528000)
> libutil.so.1 => /lib/x86_64-linux-gnu/libutil.so.1 (0x00007f2f57320000)
> libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f2f57018000)
> libaspell.so.15 => /usr/lib/libaspell.so.15 (0x00007f2f56d50000)
> /lib64/ld-linux-x86-64.so.2 (0x00007f2f58e48000)
>
> ubuntu@ubuntu-pc:/tmp$ nm /usr/local/lib/liblink-grammar.so.5
> 0000000000017d60 t abridged_lookup_list
> 0000000000032e50 t add_alternative_with_subscr
> 0000000000009c90 t add_constituent.isra.10
> 0000000000004bf0 t add_constituent.isra.10.part.11
> 0000000000018dd0 t add_empty_word
> 0000000000031940 t add_gword
> 0000000000020d40 t add_morpheme_unmarked
> 000000000001f790 t addr_compare
> 0000000000004d1e t add_string_to_label.part.1
> 00000000002494c0 d afdict_classname
> 0000000000012de0 t afdict_find
> 0000000000011ff0 t afdict_init
> 0000000000011c30 t afdict_to_wide.isra.2
> 0000000000010ca0 t alloc_count_context
> 000000000001f950 t alloc_fast_matcher
> 0000000000036ef0 t altappend
> 0000000000036ec0 t altlen
> 000000000002d4f0 t and_purge_E_list
> 0000000000005e40 t anysplit
> 0000000000005940 t anysplit_init
> 000000000002ac00 t append_string
> 000000000002ad70 t append_utf8_char
> 0000000000022360 t apply_bounded
> 0000000000023470 t apply_contains_none
> 0000000000023330 t apply_contains_one
> 00000000000231f0 t apply_contains_one_globally
> 00000000000225c0 t apply_must_form_a_cycle
> U aspell_config_replace
> U aspell_error_message
> U aspell_error_number
> U aspell_speller_check
> U aspell_speller_suggest
> U aspell_string_enumeration_next
> U aspell_word_list_elements
> U aspell_word_list_size
> 0000000000009fa0 t assign_spans
> 0000000000022960 t bad_depth_first_search
> 00000000000119d0 t boolean_dictionary_lookup
> 0000000000017ae0 t boolean_lookup
> 0000000000249618 b __bss_start
> 0000000000249740 b buff.7363
> 0000000000249640 b buff.7381
> 0000000000009030 t build_clause
> 0000000000038ef0 t build_connector_set_from_expression
> 00000000000093f0 T build_disjuncts_for_exp
> 0000000000020550 t build_idiom_word_name
> 000000000001f680 t build_parse_set
> 00000000000097c0 t build_sentence_disjuncts
> 0000000000023710 t build_type_array
> 0000000000009610 t build_word_expressions
> 0000000000039ad0 t calculate_connector_hash
> U calloc@@GLIBC_2.2.5
> 000000000001ad90 T catenate_disjuncts
> 0000000000038e40 t catenate_X_nodes
> 000000000001a630 t check_db
> 0000000000007020 T check_link_size
> 0000000000249870 b clt
> 0000000000011c00 t cmplen
> 000000000002fd70 t compile_regexs
> 0000000000249620 b completed.6973
> 0000000000021080 T compute_chosen_words
> 0000000000004e90 T compute_link_names
> 0000000000038eb0 T connector_new
> 0000000000039670 t connector_set_create
> 0000000000039710 t connector_set_delete
> 0000000000022730 t contained_in.isra.11
> 0000000000020670 t contains_underbar
> 0000000000249574 d contraction_chars
> 0000000000038bc0 t copy_E_list
> 0000000000038b50 t copy_Exp
> 00000000000088b0 t count_clause
> 0000000000009530 t count_disjunct_for_dict_node
> 000000000001add0 T count_disjuncts
> U __ctype_b_loc@@GLIBC_2.3
> U __ctype_get_mb_cur_max@@GLIBC_2.2.5
> 0000000000249550 d current_name
> 00000000002599a0 b custom_data_dir
> w __cxa_finalize@@GLIBC_2.2.5
> 000000000001a040 t db_close
> 000000000001a000 t db_free_llist
> 000000000001a5b0 t db_lookup
> 000000000001a320 t db_lookup_list
> 000000000001a220 t db_open
> 0000000000022b80 t d_depth_first_search
> 0000000000249580 d debug
> U delete_aspell_can_have_error
> U delete_aspell_config
> U delete_aspell_speller
> U delete_aspell_string_enumeration
> 0000000000010c10 t delete_unmarked_disjuncts
> 00000000000227f0 t depth_first_search
> 0000000000004da0 t deregister_tm_clones
> 0000000000031280 t determine_word_expressions.isra.12
> 00000000000199a0 T dict_display_word_expr
> 0000000000019890 T dict_display_word_info
> 0000000000014270 t dict_error2.constprop.13
> 00000000000364b0 t dict_file_open
> 0000000000011940 T dictionary_create_default_lang
> 000000000001a660 t dictionary_create_from_db
> 0000000000013040 t dictionary_create_from_file
> 0000000000013140 T dictionary_create_from_utf8
> 0000000000011900 T dictionary_create_lang
> 0000000000011a80 T dictionary_delete
> 0000000000036a80 T dictionary_get_data_dir
> 0000000000011990 T dictionary_get_lang
> 00000000000119b0 T dictionary_lookup_list
> 0000000000014de0 t dictionary_lookup_wild.isra.3
> 0000000000036a50 T dictionary_set_data_dir
> 0000000000012580 t dictionary_six
> 0000000000012ba0 t dictionary_six_str.constprop.3
> 0000000000036c90 t dictopen
> 00000000000131a0 t dict_order_bare
> 00000000000131f0 t dict_order_wild
> 000000000001b7e0 t disjunct_word_print
> 0000000000017c40 t display_word_expr
> 0000000000017b00 t display_word_info
> 000000000000ffe0 t do_count
> 0000000000004e10 t __do_global_dtors_aux
> 0000000000248d90 t __do_global_dtors_aux_fini_array_entry
> 00000000000223e0 t domain_compare
> 000000000000fe80 t do_match
> 0000000000010a20 t do_parse
> 0000000000023d40 T do_post_process
> 0000000000036620 t downcase_utf8_str
> 00000000002494a0 d __dso_handle
> 0000000000004c1e t dummy_set
> 0000000000248da0 d _DYNAMIC
> 0000000000036980 t dyn_strcat
> 0000000000036960 t dyn_str_delete
> 0000000000036920 t dyn_str_new
> 00000000002495a0 d e.5891
> 0000000000249618 d _edata
> 000000000001adf0 T eliminate_duplicate_disjuncts
> 0000000000036fe0 t empty_word
> 00000000002599b0 b _end
> 000000000001c140 t err_msg
> U __errno_location@@GLIBC_2.2.5
> 00000000000368f0 T exalloc
> 00000000000239d0 t exfree_domain_names
> 000000000001a2d0 t exists_cb
> U exit@@GLIBC_2.2.5
> 000000000001a530 t exp_cb
> 00000000000376c0 t exp_compare
> 0000000000037d70 t exp_contains
> 00000000000181b0 t Exp_create
> 0000000000038030 t exp_has_connector.isra.2
> 000000000002da40 t expression_prune
> 0000000000009930 t exprint_constituent_structure.isra.7
> 00000000000086e0 t extract_connectors
> 000000000001f770 t extract_links
> 0000000000259970 b fallback_data
> 0000000000259980 b fallback_func
> U fclose@@GLIBC_2.2.5
> 000000000001c2f0 t feature_enabled
> U feof@@GLIBC_2.2.5
> U ferror@@GLIBC_2.2.5
> U fflush@@GLIBC_2.2.5
> U fgetc@@GLIBC_2.2.5
> U fgets@@GLIBC_2.2.5
> 0000000000036ca0 t file_exists
> U fileno@@GLIBC_2.2.5
> 00000000000370b0 t find_real_unsplit_word
> 000000000000fd20 t find_table_pointer
> 00000000000119e0 t find_word_in_dict
> 0000000000039b50 t _fini
> 0000000000035a90 t flatten_wordgraph
> U fmaxf@@GLIBC_2.2.5
> U fopen@@GLIBC_2.2.5
> 000000000001fd90 t form_match_list
> U __fprintf_chk@@GLIBC_2.3.4
> 0000000000004e50 t frame_dummy
> 0000000000248d88 t __frame_dummy_init_array_entry
> 0000000000048be8 r __FRAME_END__
> U fread@@GLIBC_2.2.5
> 00000000000058b0 t free_anysplit
> 0000000000038e80 T free_connectors
> 0000000000010d50 t free_count_context
> 0000000000011160 t free_dict_node_recursive
> 000000000001ad40 T free_disjuncts
> 0000000000038ab0 t free_E_list
> 0000000000038ae0 t free_Exp
> 0000000000011a20 t free_Exp_list
> 000000000001f7e0 t free_fast_matcher
> U free@@GLIBC_2.2.5
> 0000000000006690 t free_linkages
> 0000000000011bf0 t free_llist
> 0000000000017a00 t free_lookup
> 00000000000119c0 T free_lookup_list
> 000000000001f5c0 t free_parse_info
> 0000000000030030 t free_regexs
> 0000000000019fd0 t free_Word_file
> 0000000000038e00 t free_X_nodes
> 0000000000040c47 r __func__.5981
> 000000000003b9c0 r __func__.6112
> 0000000000039e73 r __func__.6130
> 000000000003b3ed r __func__.6146
> 00000000000422a0 r __func__.6155
> 0000000000039e82 r __func__.6199
> 000000000003c3a0 r __func__.6210
> 00000000000422c0 r __func__.6216
> 0000000000042286 r __func__.6275
> 0000000000042210 r __func__.6303
> 0000000000040a00 r __func__.6399
> 000000000004222c r __func__.6448
> 00000000000409d8 r __func__.6479
> 00000000000409c0 r __func__.6487
> 00000000000409a0 r __func__.6495
> 000000000004223a r __func__.6518
> 000000000004226d r __func__.6571
> 0000000000042261 r __func__.6611
> 0000000000042250 r __func__.6631
> 0000000000042202 r __func__.6643
> 0000000000042278 r __func__.6682
> 00000000000421d0 r __func__.6760
> 00000000000421f0 r __func__.6804
> 000000000003a520 r __func__.7567
> 000000000003a540 r __func__.7722
> U fwrite@@GLIBC_2.2.5
> U __fxstat@@GLIBC_2.2.5
> 000000000000a570 t gen_comp.constprop.19
> 0000000000020250 t generate_id_connector.isra.0
> 0000000000036de0 t get_default_locale
> 0000000000011d80 t get_dict_affixes
> U getenv@@GLIBC_2.2.5
> 0000000000036d00 t get_file_contents
> 00000000000368b0 t get_max_space_used
> U getrusage@@GLIBC_2.2.5
> 00000000000368a0 t get_space_in_use
> 0000000000249000 d _GLOBAL_OFFSET_TABLE_
> 0000000000249840 b global_rand_state
> w __gmon_start__
> 0000000000037020 t gwordlist_append
> 0000000000036ff0 t gwordlist_len
> 0000000000036f50 t gword_new
> 0000000000004d3d t gwordqueue_add.isra.4.part.5
> 0000000000037540 t gword_status
> 00000000000042c0 t _init
> 0000000000039660 T init_connector
> 0000000000036890 t init_memusage
> 0000000000037240 t in_same_alternative
> 000000000002bef0 t insert_connectors.isra.6.constprop.13
> 000000000002b710 t insert_connectors.isra.6.constprop.14
> 0000000000018f70 t insert_dict
> 00000000000206b0 t insert_idiom
> 00000000000191c0 t insert_list
> 0000000000031b00 t is_capitalizable.isra.9
> 0000000000020d20 t is_idiom_word
> 0000000000011890 t is_stem
> 0000000000033700 t issue_dictcap
> 0000000000033850 t issue_r_stripped.constprop.14
> 0000000000031c80 t issue_word_alternative
> 0000000000011840 t is_suffix
> U iswalpha@@GLIBC_2.2.5
> U iswdigit@@GLIBC_2.2.5
> U iswspace@@GLIBC_2.2.5
> U iswupper@@GLIBC_2.2.5
> w _ITM_deregisterTMCloneTable
> w _ITM_registerTMCloneTable
> 0000000000248d98 d __JCR_END__
> 0000000000248d98 d __JCR_LIST__
> 0000000000020db0 t join_null_word.isra.1
> 00000000000369e0 t join_path
> w _Jv_RegisterClasses
> 0000000000028dc0 t left_append_string
> 000000000002b3c0 t left_connector_list_update
> 0000000000036580 T left_print_string
> 00000000000278b0 t lg_br_extract_dir
> 00000000000279d0 t lg_br_extract_prefix
> 0000000000027b90 t lg_br_set_locate_fallback_func
> 0000000000027810 t lg_br_strcat
> 000000000001be40 T lg_compute_disjunct_strings
> 000000000001c3f0 T lg_expand_disjunct_list
> 0000000000036510 T lg_strlcpy
> 0000000000013c00 t link_advance
> 0000000000022340 T linkage_corpus_cost
> 0000000000022000 T linkage_create
> 0000000000022070 T linkage_delete
> 0000000000022300 T linkage_disjunct_cost
> 0000000000009d60 t linkage_free_constituent_tree
> 000000000000fd10 T linkage_free_constituent_tree_str
> 0000000000029530 T linkage_free_diagram
> 0000000000029540 T linkage_free_disjuncts
> 0000000000029550 T linkage_free_links_and_domains
> 0000000000029d90 T linkage_free_postscript
> 0000000000023a00 t linkage_free_pp_info
> 0000000000029dd0 T linkage_free_pp_msgs
> 0000000000029560 T linkage_free_senses
> 0000000000022290 T linkage_get_disjunct_corpus_score
> 0000000000022260 T linkage_get_disjunct_cost
> 00000000000221f0 T linkage_get_disjunct_str
> 00000000000239a0 T linkage_get_link_domain_names
> 0000000000022150 T linkage_get_link_label
> 00000000000220c0 T linkage_get_link_length
> 0000000000022180 T linkage_get_link_llabel
> 00000000000220f0 T linkage_get_link_lword
> 0000000000023970 T linkage_get_link_num_domains
> 00000000000221b0 T linkage_get_link_rlabel
> 0000000000022120 T linkage_get_link_rword
> 00000000000220a0 T linkage_get_num_links
> 0000000000022080 T linkage_get_num_words
> 00000000000239c0 T linkage_get_violation_name
> 00000000000222c0 T linkage_get_word
> 00000000000221e0 T linkage_get_words
> 0000000000022320 T linkage_link_cost
> 0000000000024e20 T linkage_post_process
> 000000000000f900 T linkage_print_constituent_tree
> 00000000000294a0 T linkage_print_diagram
> 00000000000280c0 t linkage_print_diagram_ctxt
> 0000000000029300 T linkage_print_disjuncts
> 0000000000028f00 T linkage_print_links_and_domains
> 0000000000029570 T linkage_print_postscript
> 0000000000029da0 T linkage_print_pp_msgs
> 00000000000292c0 T linkage_print_senses
> 0000000000030490 T linkage_score
> 00000000000237e0 t linkage_set_domain_names
> 00000000000222e0 T linkage_unused_word_cost
> 0000000000017a30 T linkgrammar_get_dict_version
> 00000000000171b0 T linkgrammar_get_version
> 000000000001c510 t list_links
> 000000000001c6c0 t list_random_links
> 0000000000012e80 t load_affix
> 00000000000171c0 t lookup_list
> 000000000001a060 t make_expression
> U malloc@@GLIBC_2.2.5
> 000000000002c920 t mark_dead_connectors.isra.1
> 000000000002c6d0 t mark_dead_connectors.isra.1.part.2
> 0000000000039770 T match_in_connector_set
> 000000000002fea0 t match_regex
> U mbrtowc@@GLIBC_2.2.5
> U mbsrtowcs@@GLIBC_2.2.5
> U memcpy@@GLIBC_2.14
> U memmove@@GLIBC_2.2.5
> U memset@@GLIBC_2.2.5
> 000000000001e570 t mk_parse_set
> 000000000001e240 t mk_parse_set.constprop.7
> 000000000001d790 t mk_parse_set.constprop.8
> 000000000001c880 t mk_parse_set.constprop.9
> 000000000001a400 t morph_cb
> 0000000000005390 t morpheme_match.isra.0
> 0000000000033480 t morpheme_split
> 0000000000032870 t mprefix_split
> U new_aspell_config
> U new_aspell_speller
> U nl_langinfo@@GLIBC_2.2.5
> 0000000000020460 t numberfy
> 0000000000036aa0 T object_open
> 000000000002cd70 t or_purge_E_list
> 0000000000249860 b p.6083
> 000000000001f510 t parse_info_new
> 0000000000006ac0 T parse_options_create
> 0000000000006b60 T parse_options_delete
> 0000000000006eb0 T parse_options_get_all_short_connectors
> 0000000000006bd0 T parse_options_get_cost_model_type
> 0000000000006cb0 T parse_options_get_debug
> 0000000000006df0 T parse_options_get_disjunct_cost
> 0000000000006f40 T parse_options_get_display_morphology
> 0000000000006e50 T parse_options_get_islands_ok
> 0000000000006dd0 T parse_options_get_linkage_limit
> 0000000000006f10 T parse_options_get_max_memory
> 0000000000006e30 T parse_options_get_max_null_count
> 0000000000006ef0 T parse_options_get_max_parse_time
> 0000000000006e10 T parse_options_get_min_null_count
> 0000000000006ed0 T parse_options_get_repeatable_rand
> 0000000000006e90 T parse_options_get_short_length
> 0000000000006e70 T parse_options_get_spell_guess
> 0000000000006d70 T parse_options_get_test
> 0000000000006f30 T parse_options_get_use_cluster_disjuncts
> 0000000000006d90 T parse_options_get_use_sat_parser
> 0000000000006db0 T parse_options_get_use_viterbi
> 0000000000006bf0 T parse_options_get_verbosity
> 0000000000006f70 T parse_options_memory_exhausted
> 0000000000030350 T parse_options_print_total_time
> 0000000000006f90 T parse_options_reset_resources
> 0000000000006f80 T parse_options_resources_exhausted
> 0000000000006ea0 T parse_options_set_all_short_connectors
> 0000000000006b80 T parse_options_set_cost_model_type
> 0000000000006c00 T parse_options_set_debug
> 0000000000006de0 T parse_options_set_disjunct_cost
> 0000000000006f50 T parse_options_set_display_morphology
> 0000000000006e40 T parse_options_set_islands_ok
> 0000000000006dc0 T parse_options_set_linkage_limit
> 0000000000006f00 T parse_options_set_max_memory
> 0000000000006e20 T parse_options_set_max_null_count
> 0000000000006ee0 T parse_options_set_max_parse_time
> 0000000000006e00 T parse_options_set_min_null_count
> 0000000000006ec0 T parse_options_set_repeatable_rand
> 0000000000006e80 T parse_options_set_short_length
> 0000000000006e60 T parse_options_set_spell_guess
> 0000000000006cc0 T parse_options_set_test
> 0000000000006f20 T parse_options_set_use_cluster_disjuncts
> 0000000000006d80 T parse_options_set_use_sat_parser
> 0000000000006da0 T parse_options_set_use_viterbi
> 0000000000006be0 T parse_options_set_verbosity
> 0000000000006f60 T parse_options_timer_expired
> 000000000000a390 t parse_string
> 0000000000006fa0 T partial_init_linkage
> 00000000000118c0 t patch_subscript
> 0000000000259990 b path_found.7087
> 0000000000024e00 T post_process_close
> 0000000000023ba0 t post_process_free
> 0000000000023650 t post_process_free_data
> 0000000000023140 T post_process_match
> 0000000000023a90 t post_process_new
> 0000000000024de0 T post_process_open
> 0000000000023ca0 t post_process_scan_linkage
> 000000000002dfc0 t power_prune
> 000000000002f3d0 t pp_and_power_prune
> 00000000000235b0 t pp_free_domain_array
> 0000000000025bc0 t pp_knowledge_close
> 00000000000250e0 t pp_knowledge_open
> 0000000000027120 t pp_lexer_close
> 00000000000272b0 t pp_lexer_count_commas_of_label
> 0000000000027230 t pp_lexer_count_tokens_of_label
> 0000000000025ec0 t pp_lexer__create_buffer
> 0000000000025de0 t pp_lexer__delete_buffer
> 0000000000025e40 t pp_lexer__flush_buffer
> 0000000000027310 t pp_lexer_get_next_group_of_tokens_of_label
> 0000000000027280 t pp_lexer_get_next_token_of_label
> 00000000002598f0 b pp_lexer_in
> 0000000000025e90 t pp_lexer__init_buffer
> 0000000000259930 b pp_lexer_leng
> 0000000000025f70 t pp_lexer_lex
> 0000000000249560 d pp_lexer_lineno
> 0000000000025d50 t pp_lexer__load_buffer_state
> 0000000000026e50 t pp_lexer_open
> 00000000002598e0 b pp_lexer_out
> 0000000000025f20 t pp_lexer_restart
> 00000000000271b0 t pp_lexer_set_label
> 0000000000025d90 t pp_lexer__switch_to_buffer
> 00000000002598d0 b pp_lexer_text
> 0000000000027540 t pp_linkset_add
> 00000000000274a0 t pp_linkset_clear
> 0000000000027510 t pp_linkset_close
> 0000000000027670 t pp_linkset_match
> 0000000000027730 t pp_linkset_match_bw
> 0000000000027440 t pp_linkset_open
> 00000000000277f0 t pp_linkset_population
> 0000000000023a60 t pp_new_domain_array
> 0000000000027ba0 t prepare_to_parse
> 000000000003db70 r __PRETTY_FUNCTION__.3581
> 000000000003db50 r __PRETTY_FUNCTION__.3597
> 000000000002aa30 t print_chosen_disjuncts_words
> 0000000000009870 t print_constituent.isra.0.part.1
> 0000000000019380 T print_dictionary_data
> 0000000000029de0 t print_disjunct_counts
> 0000000000011bb0 T print_expression
> 0000000000010dd0 t print_expression_parens
> 0000000000029e60 t print_expression_sizes
> U __printf_chk@@GLIBC_2.3.4
> 000000000000e3d0 t print_flat_constituents
> 000000000002a7c0 t print_lwg_path
> 000000000001b260 T print_one_disjunct
> 0000000000029f00 t print_sentence_word_alternatives
> 00000000000302a0 t print_time
> 0000000000030420 t print_total_space
> 000000000000a9f0 t print_tree
> 000000000002a760 t print_with_subscript_dot
> 000000000002a8b0 t print_wordgraph_pathpos
> 000000000001a880 t prt_con
> 000000000001c1d0 T prt_error
> 0000000000013340 t prune_lookup_list
> 000000000001f7b0 t put_match_list
> U qsort@@GLIBC_2.2.5
> U rand_r@@GLIBC_2.2.5
> 00000000000137c0 t rdictionary_lookup
> 00000000000143a0 t rdictionary_lookup.constprop.11
> 00000000000223f0 t reachable_without_dfs
> 000000000000b290 t read_constituents_from_domains.constprop.12
> 0000000000024e30 t read_contains_rules.isra.1
> 00000000000193e0 t read_dictionary
> 0000000000019ab0 t read_regex_file
> 0000000000019e00 t read_word_file
> U realloc@@GLIBC_2.2.5
> 000000000001c430 t record_choice.constprop.10
> U regcomp@@GLIBC_2.2.5
> U regerror@@GLIBC_2.2.5
> U regexec@@GLIBC_2.3.4
> 0000000000030080 T regex_tokenizer_test
> U regfree@@GLIBC_2.2.5
> 0000000000004dd0 t register_tm_clones
> 0000000000020f50 t remap_linkages
> 00000000000068e0 t remove_empty_words
> 0000000000022dc0 t report_pp_stats.isra.2.part.3
> 0000000000030090 t resources_create
> 0000000000030110 t resources_delete
> 0000000000030250 t resources_exhausted
> 0000000000030210 t resources_memory_exhausted
> 0000000000030120 t resources_reset
> 0000000000030180 t resources_reset_space
> 0000000000030190 t resources_timer_expired
> 00000000000181d0 t restricted_expression
> 0000000000011be0 t return_true
> 000000000001b8d0 t reversed_conlist_str
> 000000000002b050 t right_connector_list_update
> 00000000000134b0 t rprint_dictionary_data
> 0000000000036550 t safe_strcat
> 00000000000364e0 t safe_strcpy
> 00000000000364c0 t safe_strdup
> 0000000000007490 T sane_linkage_morphism
> U sat_create_linkage
> U sat_parse
> U sat_sentence_delete
> 0000000000007060 T sentence_create
> 00000000000071f0 T sentence_delete
> 0000000000007420 T sentence_disjunct_cost
> 0000000000036330 t sentence_in_dictionary
> 0000000000007340 T sentence_length
> 0000000000007450 T sentence_link_cost
> 0000000000007360 T sentence_null_count
> 0000000000007380 T sentence_num_linkages_found
> 00000000000073c0 T sentence_num_linkages_post_processed
> 00000000000073a0 T sentence_num_valid_linkages
> 00000000000073e0 T sentence_num_violations
> 0000000000007cf0 T sentence_parse
> 0000000000007170 T sentence_split
> 0000000000035600 t separate_sentence
> 0000000000033a50 t separate_word
> 0000000000027e50 t set_centers
> 000000000002ae50 t set_dist_fields.constprop.15
> 000000000002af50 t set_dist_fields.constprop.16
> U setlocale@@GLIBC_2.2.5
> 0000000000004cf0 t setup_domain_array.part.9
> 0000000000038b00 t size_of_expression
> U __snprintf_chk@@GLIBC_2.3.4
> 0000000000030570 t spellcheck_create
> 00000000000306e0 t spellcheck_destroy
> 0000000000030840 t spellcheck_free_suggest
> 0000000000030750 t spellcheck_suggest
> 0000000000030710 t spellcheck_test
> 0000000000005060 t split_and_cache
> 0000000000005640 t split_and_cache.constprop.1
> U sqlite3_close
> U sqlite3_errmsg
> U sqlite3_exec
> U sqlite3_open
> U __stack_chk_fail@@GLIBC_2.4
> U stderr@@GLIBC_2.2.5
> U stdin@@GLIBC_2.2.5
> U stdout@@GLIBC_2.2.5
> U strcat@@GLIBC_2.2.5
> U strchr@@GLIBC_2.2.5
> U strcmp@@GLIBC_2.2.5
> U __strcpy_chk@@GLIBC_2.3.4
> U strcpy@@GLIBC_2.2.5
> U __strdup@@GLIBC_2.2.5
> U strerror@@GLIBC_2.2.5
> 000000000002abe0 t string_copy
> 000000000002abb0 t string_delete
> 000000000002ab70 t string_new
> 0000000000030950 t string_set_add
> 0000000000030890 t string_set_create
> 0000000000030da0 t string_set_delete
> 0000000000030cc0 t string_set_lookup
> 000000000002abd0 t string_value
> 0000000000030e00 t strip_right.isra.6
> U strlen@@GLIBC_2.2.5
> U __strncat_chk@@GLIBC_2.3.4
> U strncat@@GLIBC_2.2.5
> U strncmp@@GLIBC_2.2.5
> U __strncpy_chk@@GLIBC_2.3.4
> U strncpy@@GLIBC_2.2.5
> U __strndup@@GLIBC_2.2.5
> U strpbrk@@GLIBC_2.2.5
> U strrchr@@GLIBC_2.2.5
> U strspn@@GLIBC_2.2.5
> U strstr@@GLIBC_2.2.5
> U strtod@@GLIBC_2.2.5
> U strtol@@GLIBC_2.2.5
> 0000000000013450 t subscr_match.isra.2
> 0000000000033140 t suffix_split
> 000000000000ffb0 t table_lookup
> 0000000000249578 d test
> 0000000000249618 d __TMC_END__
> U to_aspell_speller
> U towlower@@GLIBC_2.2.5
> U towupper@@GLIBC_2.2.5
> 0000000000249850 b uc.6049
> 0000000000036750 t upcase_utf8_str
> 0000000000006a50 t VDAL_compare_parse
> 00000000002599a8 b verbosity
> 000000000001bf50 t verr_msg
> U __vfprintf_chk@@GLIBC_2.3.4
> U __vsnprintf_chk@@GLIBC_2.3.4
> U wcrtomb@@GLIBC_2.2.5
> U wcschr@@GLIBC_2.2.5
> 0000000000004d6b t wctomb_check.part.0
> 0000000000039a30 t word_contains
> 00000000000370e0 t wordgraph_hier_position
> 00000000000067a0 t wordgraph_path_append
> 00000000000372b0 t wordgraph_pathpos_add
> 0000000000037060 t wordgraph_pathpos_len
> 0000000000037090 t wordgraph_pathpos_resize
> 00000000000376b0 t wordgraph_show
> 00000000000398f0 t word_has_connector
> 00000000000316d0 t word_label.isra.3.constprop.15
> 0000000000031840 t word_label.isra.3.constprop.16
> 0000000000039a10 t word_only_connector
> 000000000001b790 t word_record_in_disjunct
> 00000000000368c0 T xalloc
> 000000000003da00 r yy_accept
> 000000000003da40 r yy_acclist
> 000000000003d580 r yy_base
> 0000000000259920 b yy_c_buf_p
> 000000000003d400 r yy_chk
> 0000000000259960 b yy_current_buffer
> 000000000003d540 r yy_def
> 0000000000259900 b yy_did_buffer_switch_on_eof
> 000000000003d600 r yy_ec
> 0000000000025d20 t yy_fatal_error
> 0000000000249890 b yy_full_match
> 0000000000259950 b yy_hold_char
> 0000000000249570 d yy_init
> 0000000000249880 b yy_lp
> 000000000003d5c0 r yy_meta
> 0000000000259940 b yy_n_chars
> 000000000003d4a0 r yy_nxt
> 0000000000259910 b yy_start
> 00000000002498c0 b yy_state_buf
> 00000000002498a0 b yy_state_ptr

Corey Thompson

unread,
Aug 18, 2015, 9:42:35 PM8/18/15
to link-grammar, cor...@gmail.com, linasv...@gmail.com
Linas,

Thanks for the detective work.  I appreciate it so much.  My remedy:
$ sudo apt-get remove pylink
$ sudo apt-get remove liblink-grammar4-dev
$ sudo apt-get remove liblink-grammar4
$ sudo apt-get autoremove

Now things are working:
ubuntu@ubuntu-pc:~/projects/link-grammar/bindings/python-examples$ ./example.py 
link-grammar: Info: Dictionary found at /usr/local/share/link-grammar/en/4.0.dict
English: Found 4 linkages (4 had no P.P. violations)
[munch] 


Corey


On Tuesday, August 18, 2015 at 8:29:05 PM UTC-5, Linas Vepstas wrote:
Reply all
Reply to author
Forward
0 new messages