I suggest you ...

Unexpected response according to the context of a text!

With the interactive api I tried "/expressions/contexts" (http://api.cortical.io/Expression.htm#!/expressions/getContextsForExpression_post_1) with the following text input and I did not expect to get “cheese” as a result in the list.
{
"text": "I was drinking beer with my friends at the Oktoberfest"
}
Do you have any suggestion to improve the result here? Maybe it would be awesome just to get words describing the context which are actually used in the text?

2 votes
Vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    Michael Klein shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

    2 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      Signed in as (Sign out)
      Submitting...
      • Francisco Webber commented  ·   ·  Flag as inappropriate

        Hello Michael,
        What you have called here was not the "Keywords" endpoint but the "Contexts" endpoint.
        The context endpoint divides a given fingerprint in different contexts and returns the word with the most similar fingerprint to the bits of the initial fingerprint that are part of this context.
        Example:
        the word “apple” hat these 3 (first) contexts: “software, “fruit” and “hardware”
        this means that the fingerprint of apple contains sub-sets of dots corresponding to specific contexts in which the word apple appears. If you take the first (largest) sub-set of dots and ask for the word with the biggest overlap you get the word “software”. In a next step the system takes away all the dots of this first set and then looks again for the next one … and so on.
        you can (and you did) do the same for texts. So the first subset of dots (that builds a context) of the text "I was drinking beer with my friends at the oktoberfest” shares many dots with the word cheese (you can ask for more matching words to get a better feeling in what context “cheese” was meant here).
        To get the corresponding context terms from the input text you should use the "Keywords" endpoint instead of the "Contexts" endpoint.
        I hope this helps clarifying.

        All the Best
        Francisco

      • Michael Klein commented  ·   ·  Flag as inappropriate

        The response I get is:

        [
        {
        "context_label": "cheese",
        "fingerprint": {
        "positions": []
        },
        "context_id": 0
        },
        {
        "context_label": "event",
        "fingerprint": {
        "positions": []
        },
        "context_id": 1
        },
        {
        "context_label": "company",
        "fingerprint": {
        "positions": []
        },
        "context_id": 2
        },
        {
        "context_label": "prussian",
        "fingerprint": {
        "positions": []
        },
        "context_id": 3
        },
        {
        "context_label": "rugby",
        "fingerprint": {
        "positions": []
        },
        "context_id": 4
        }
        ]

      Feedback and Knowledge Base