Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lefthand context in KWIC results broken #10

Closed
4 tasks done
dwhieb opened this issue Feb 3, 2021 · 3 comments
Closed
4 tasks done

lefthand context in KWIC results broken #10

dwhieb opened this issue Feb 3, 2021 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@dwhieb
Copy link

dwhieb commented Feb 3, 2021

The lefthand side of the KWIC results shows the correct token, but the wrong information for that token. The righthand context is working.

Test Case: ê-itôtahk should have wapemaw to the left
Current production version: http://altlab.ualberta.ca/korp/
Current development version: https://korp.altlab.dev/

Next up:

  • finalize fix by making sure the spContext setting is in the right place
  • add README documentation about changed settings
  • add inline documentation about settings
  • redeploy to dev
@dwhieb dwhieb added the bug Something isn't working label Feb 3, 2021
@dwhieb dwhieb self-assigned this Feb 3, 2021
@dwhieb
Copy link
Author

dwhieb commented Feb 3, 2021

This is how the data is being returned from the server in the XHR:

[
  {
    "word": " witnesses s.o."
  },
  {
    "word": "\u00ea-it\u00f4tahk",
    "lemma": "it\u00f4tam",
    "msd": "PV.e.V.TI.Cnj.Prs.3Sg",
    "dep": "pred.ti",
    "gloss": "s/he does s.t. thus, s/he does thus, s/he acts thus"
  },
  {
    "word": ",",
    "lemma": ",",
    "msd": "CLB",
    "dep": null,
    "gloss": "__UNDE"
  }
]

These results are then passed to kwicCallback. This could mean that the query is incorrect, or the server is returning unexpected data.

@dwhieb
Copy link
Author

dwhieb commented Feb 3, 2021

The query being sent to the server:

default_context=1+sentence&show=sentence%2Cmsd%2Cgloss%2Clemma%2Cdep&show_struct=text_author%2Ctext_title%2Ctext_title1%2Ctext_title2%2Ctext_lang&start=0&end=24&corpus=WOLFART_AHENAKEW&cqp=%5Bword+%3D+%22%C3%AA-it%C3%B4tahk%22%5D&query_data=&context=WOLFART_AHENAKEW%3Aundefined&incremental=true&default_within=sentence&within=

In JSON format:

{
  "default_context": "1 sentence",
  "show":            "sentence,msd,gloss,lemma,dep",
  "show_struct":     "text_author,text_title,text_title1,text_title2,text_lang",
  "start":           "0",
  "end":             "24",
  "corpus":          "WOLFART_AHENAKEW",
  "cqp":             "[word = \"ê-itôtahk\"]",
  "query_data":      "",
  "context":         "WOLFART_AHENAKEW:undefined",
  "incremental":     "true",
  "default_within":  "sentence",
  "within":          ""
}

@dwhieb
Copy link
Author

dwhieb commented Feb 5, 2021

Tested out a fix on the dev server. The KWIC context is now working fine. Will finalize the fix, and add documentation for it and the deployment process, and redeploy before closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant