ispras / lingvodoc-react

Apache License 2.0
7 stars 11 forks source link

Implement bidirectional_links mutation #1059

Closed vmonakhov closed 8 months ago

vmonakhov commented 8 months ago

The dictionary http://lingvodoc.ispras.ru/dictionary/4755/333300/perspective/4755/333302/view contains too few links between lexical entries and paradigmatic forms. Seems like large part of links is not built in convertation from .eaf file (1) or some of them are not bidirectional (2).

(1) The converter was tested in detail for the same eaf-files which were used for the problematic dictionary. The described problem is not reproduced any more.

(2) Implemented bidirectional_links mutation to fix one-way links in the problematic dictionary. Found 326 not correct links have been fixed. But the main problem is that linked lexical entries were manually deleted before and so, big amount of links became failed. About 76 thousand links were broken this way.

*** bidirectional_links mutation

    curl 'http://localhost:6543/graphql' \
      -H 'Content-Type: application/json' \
      -H 'Cookie: auth_tkt=_tkn_!userid_type:int' \
      --data-raw '{ \
        "operationName": "bidirectionalLinks", \
        "variables":{"dictionaryIdList":[[4755,333300]]}, \
        "query": \
          "mutation bidirectionalLinks($dictionaryIdList: [LingvodocID]!) { \
            bidirectional_links(dictionary_id_list: $dictionaryIdList, debug_flag: true) { \
              triumph }}"}'

    #! Remove any newline after --data-raw to call this from Ubuntu.
    #! Change _tkn_ to actual token for administrator.
    #! Be careful, used token may be not actual after database restart.
vmonakhov commented 8 months ago

Solved with comments above.