Unable to understand the JSON result of 'Another'!

shahoodshahood Member ✭✭

Hi,

This is the first word of this kind that I've noticed. Pl see that under entry having homograph # 001, there are cases where a sense contains subsenses, among other objects, but not any definitions of its own.
Kindly explain how a sense that doesn't have a definition for itself can have subsenses that define and explain themselves.

Comments

  • shahoodshahood Member ✭✭
  • SimoneSimone Administrator admin

    Hi @shahood

    Please note that as per our Member Guidelines, the forum is not monitored during weekend days, so sometimes it may take us a bit longer to reply (and even on weekend days it is unfortunately not always possible to reply immediately).

    But bear with me, let me consult my colleagues and get a good explanation in answer to your query! :)

  • AmosDuveenAmosDuveen Member, Administrator, Moderator admin

    Hi @shahood,

    I cannot seem to find the example you refer to; could you please reply with your call URL so that I can have a proper look?

    One thing that also might help is to know that not all senses carry a definition (e.g. sense 6 of term), which can be a source of confusion. In such instances, you will find a cross reference to a different entry marked out by arrays called crossReferenceMarkers (for display text) and crossReferences (to guide you to the linked entry).

  • shahoodshahood Member ✭✭

    Hi @AmosDuveen

    Thanks for the reply!

    I'm talking about the 3rd & 4th senses under 2nd entry (homograph 001). The first 2 senses under this entry have proper definitions and examples but the 3rd ("id": "m_en_gbus0035780.006") & 4th ("id": "m_en_gbus0035780.011") show a subsense straight away. Although sense definition is an optional field but I need to understand how a sense can have a subsense but not a definition.

    The case of 'term' you mentioned above is something I'm ready for and it has duly been taken into account.

  • shahoodshahood Member ✭✭

    Hi @Simone

    Sorry for troubling you on weekend. I was probably being over ambitious.

    Thanks for the reply!

  • shahoodshahood Member ✭✭
    edited June 2018

    @AmosDuveen

    U can find the same pattern in the word 'all' at the following points:

    Entry 2 (Homograph 001), Sense 2 ("id": "m_en_gbus0023060.005")
    Entry 3 (Homograph 002), Sense 2 ("id": "m_en_gbus0023060.005")
    (Somehow, the sense IDs are the same in both cases. Don't know if it is normal or not.)

    Thanks!

  • AmosDuveenAmosDuveen Member, Administrator, Moderator admin

    Hi @shahood,

    I asked for the full URL because I cannot seem to replicate your results at my end. Could you please share the exact URLs of the calls you are having trouble with so that I can see exactly what you are seeing?

  • AmosDuveenAmosDuveen Member, Administrator, Moderator admin

    Was this the section you were referring to?:

        "thesaurusLinks": [
            {
                "entry_id": "another",
                "sense_id": "t_en_gb0000623.001"
            },
            {
                "entry_id": "another",
                "sense_id": "t_en_gb0000623.002"
            }
        ]
    
  • shahoodshahood Member ✭✭
    Not at all. I'm referring to the one attached.
    If u notice, this sense starts with an ID and then the subsense entry, there is no definition of its own.
  • AmosDuveenAmosDuveen Member, Administrator, Moderator admin

    Hi @shahood,

    I don't understand. The screenshot you shared contains a definitions array with the text "used with a proper name to indicate someone or something's similarity to the person or event specified". There is also a short_definitions array that is cut off at the bottom with the (full) text "used with proper name to indicate person or thing's similarity to person or event specified".

    Looking at the main sense, the fist array there is definitions with the text "used to refer to an additional person or thing of the same type as one already mentioned or known about; one more; a further". The second sense object also contains a definitions array with the text "used to refer to a different person or thing from one already mentioned or known about". The third object there isn't a main sense but a grouper containing a subsenses array which holds all of the subsenses related to the preceding sense.

  • shahoodshahood Member ✭✭
    I'm talking about that third sense which isn't a main sense. What is a grouper and why does it contain subsenses array holding subsenses relating to the preceding sense?
  • shahoodshahood Member ✭✭
    Also, I've shared entry numbers, sense numbers and sense IDs in order to pin point the issue. Pl let me know what else I must share so that u at least understand my point.
  • AmosDuveenAmosDuveen Member, Administrator, Moderator admin
    edited June 2018

    Hi @shahood,

    Your directions the second time were fine, I just didn't understand the problem because I think you have misinterpreted the structure.

    Maybe it is me still using the language of XML rather than JSON but that 3rd object is not a sense, it is a collection of subsenses. In XML a grouper is just a tag whose only function is to group related elements into one branch of the structure, which is why I used the term. That is also why there is no definition at that level; it is not a sense. The way to be sure which sense each of the subsenses branch off from is to look at the id string which should match another id string within one of the sense objects.

  • rajmatiGMrajmatiGM Member
    edited August 2018

    Even I want to understand better whats going on here :

    You said there are links between senses and subsenses, please elaborate with example.

    Also with whats going on here with another , the screenshot that was shared by @shahood , even I need an explanation of why there is no definition for the sense parent there. If there are subsenses within that array , why there is no sense related to it ?

    @AmosDuveen

  • rajmatiGMrajmatiGM Member

    Not seeing any response of this thread as well as other new thread that I started @AmosDuveen could you please help in this regard?

  • AmosDuveenAmosDuveen Member, Administrator, Moderator admin

    Hi @rg_m255,

    Maybe it would help if I described the overall structure rather than trying to answer specific questions, which I have already done above.

    Each of the parallel senses arrays contain one definitions object, each of which, where applicable, is followed by a subsenses object within the same array and separate from other definitions (which are in separate senses arrays).

    In the case of another, there is a first array in senses with no subsenses object then a second array which does contain a subsenses object so, looking at the array bracketing, the subsenses can only apply to the second definition.

    The structure is clearer in the first entry for go where the first and second senses arrays both contain subsenses objects but the third array does not. All the following arrays from third to the eighth have a subsenses object but the final ninth array does not.

    See below for the 8th (with subsenses) and 9th (without subsenses) arrays of go.

        {
            "definitions": [
                "(of a song or account) have a specified content or wording"
            ],
            "examples": [
                {
                    "text": "if you haven't heard it, the story goes like this"
                }
            ],
            "id": "m_en_gbus0419260.072",
            "notes": [
                {
                    "text": "no object",
                    "type": "grammaticalNote"
                }
            ],
            "short_definitions": [
                "have specified content or wording"
            ],
            "subsenses": [
                {
                    "definitions": [
                        "be known or called by (a specified name)"
                    ],
                    "examples": [
                        {
                            "text": "he now goes under the name Charles Perez"
                        }
                    ],
                    "id": "m_en_gbus0419260.073",
                    "notes": [
                        {
                            "text": "\"go by/under\"",
                            "type": "wordFormNote"
                        }
                    ],
                    "short_definitions": [
                        "be known or called by"
                    ]
                },
                {
                    "definitions": [
                        "say"
                    ],
                    "examples": [
                        {
                            "text": "the kids go, ‘Yeah, sure.’"
                        }
                    ],
                    "id": "m_en_gbus0419260.074",
                    "notes": [
                        {
                            "text": "with direct speech",
                            "type": "grammaticalNote"
                        }
                    ],
                    "registers": [
                        "informal"
                    ],
                    "short_definitions": [
                        "say"
                    ]
                }
            ]
        },
        {
            "definitions": [
                "use a toilet; urinate or defecate"
            ],
            "examples": [
                {
                    "text": "he had to go but couldn't, because she was still in the bathroom"
                }
            ],
            "id": "m_en_gbus0419260.076",
            "notes": [
                {
                    "text": "no object",
                    "type": "grammaticalNote"
                }
            ],
            "registers": [
                "informal"
            ],
            "short_definitions": [
                "use toilet"
            ]
        }
    
  • rajmatiGMrajmatiGM Member
    edited August 2018

    @AmosDuveen thanks for sharing the go example. Its making sense what you describe for "go".
    For both the types of entries that you described for go , both have a parent definition and then have/dont have sub senses on it

    However for another if you look at these screenshots, it seems there is something going on with "another".

    Try to map the array response with the UI , the another 1.1 and 2.1 from the UI screenshot should have fallen as sub senses under the first sense and second sense respectively

    The last two array entries dont have a definition at all and directly have sub senses under it which ideally should have been under of the first two senses array.

  • rajmatiGMrajmatiGM Member

    Strangely the upload of images / files doesnt seem to work , I am unable to upload the screenshots that I intended to share. Looks like there is some work going on with this website

  • AmosDuveenAmosDuveen Member, Administrator, Moderator admin
    edited August 2018

    Hi @rajmatiGM,

    I'll have to pass the website issues onto someone else. Meanwhile, you can always copy/paste text outputs like error messages here for me to look at. If it's a single line of code, you can put one of the ` (U+0060 GRAVE ACCENT) characters either side to make it clear, or, if you have multiple pretty-printed lines, make sure they have a double indent (2 tabs or 8 spaces) before each line to highlight the code as a block (as I did in my post above).

    Alternatively, you can find some other site to host your images and post me a link.

  • AmosDuveenAmosDuveen Member, Administrator, Moderator admin

    Hi @rajmatiGM,

    Can you please retry posting your image?


  • Here able to attach now.

  • AmosDuveenAmosDuveen Member, Administrator, Moderator admin

    Hi @rajmatiGM,

    Is your concern about the numbering (which is not included in the data, but which can be re-created from interpreting the structure) or the structure of the content?

    If the issue is with the structure, the indentations on the image you uploaded show that the subsenses are parallel with the definitions, what is not clear from your display is that each pairing of definitions and subsenses (alongside various other elements), is grouped together in a single object in the senses array. Other definitions and subsenses pairings are grouped into other objects in the same senses array.

    You can see the explicit bracketing around the same definitions and subsenses pairing in the sense object you are referring to at the start and end of the selection in my screenshot below. That means that those subsenses are explicitly the children of the sense with that definition. The next sense then starts in a new, different object but still within the senses array.

  • shahoodshahood Member ✭✭

    @AmosDuveen See, the arrangement of data in JSON is clearly weird in this case. This is what i tried to point at in the original post. If u just try to relate JSON with the data presented on the website, u wont be able to map it properly. In case of other words, mapping is spot on.

    Lets discuss only #1 in website image....it should be mapped with position #0 in JSON. As far as definition is concerned, it DOES map properly but subsense doesn't. 1.1 is the subsense of 1 in website image but there is no subsense under position # 0 in JSON. Instead, 1.1 is mapped with the subsense of position #2 of JSON.

    There definitely is a missing link and we developers need to be guided in the right direction. We obviously can't write separate code for different words.

    Hope u get it this time.

    @rajmatiGM may also add into it further.

  • AmosDuveenAmosDuveen Member, Administrator, Moderator admin

    Hi @shahood,

    You need to take the JSON output on its own merits because you won't be able to map the JSON output to the website output (without some much deeper logical rearrangements).

    The data has been through different processes in each case (as I think I may have mentioned in other responses in this forum). The reason for this is that both outputs contain the same content but serve different markets and purposes and so we have reworked it somewhat for ODAPI. If you notice, the sense grouping is different which I think may be the thing you are noticing?

  • shahoodshahood Member ✭✭

    Hi @AmosDuveen

    @rajmatiGM and I have been unable to convince you about this issue but thankfully, it has also been resolved in v2.

    Thumbs up to whoever redesigned the JSON schema of v2.

Sign In or Register to comment.