How to find definitions of phrasal verbs retrieved using 'search' endpoint?

shahoodshahood Member ✭✭
edited June 2018 in General

Hi @AmosDuveen

For example, I search for 'mess' using the search endpoint (https://od-api.oxforddictionaries.com:443/api/v1/search/en?q=mess&prefix=true). The second and third search results are:
{
"matchString": "mess",
"id": "mess_about%2Faround",
"word": "mess about/around",
"score": 1,
"matchType": "headword",
"region": "gb"
},
{
"matchString": "mess",
"id": "mess_about%2Faround_with",
"word": "mess about/around with",
"score": 1,
"matchType": "headword",
"region": "gb"
},
Now when any of these is searched using lemmatron endpoint (https://od-api.oxforddictionaries.com:443/api/v1/inflections/en/mess%20about%2Faround) or dictionary entry endpoint (https://od-api.oxforddictionaries.com:443/api/v1/entries/en/mess%20about%2Faround), we get a 400.

As per Oxford dictionary website, these are phrasal verbs. So, is their a separate endpoint or filter that we will have to use to get the definitions of these?

Thanks!

Tagged:

Comments

  • AmosDuveenAmosDuveen Member, Administrator, Moderator admin
    edited June 2018

    Hi @shahood,

    In terms of using the search outputs anywhere else in the data, it is the slash character contained in the wordform which causes the issue. There is not a lot I can do with that, even as a work-around so I have had to pass it on to out technical team to deal with. However, it looks like quite a troublesome issue to unpick.

    There is also a more general point about the morph data driving the Lemmatron which is currently receiving some much-needed attention but you won't see the benefit for a little while yet.

  • shahoodshahood Member ✭✭

    Hi @AmosDuveen

    Thanks for the reply!

    So what should be the best strategy to present search results for now? I’m thinking about removing all results that contain a slash, until this issue is resolved. There’s no point showing a search result if it can’t be explored further.

    Your suggestion pl!

  • AmosDuveenAmosDuveen Member, Administrator, Moderator admin

    Hi @shahood,

    I think that sounds like a sensible solution.

  • shahoodshahood Member ✭✭
  • AmosDuveenAmosDuveen Member, Administrator, Moderator admin

    Hi @shahood,

    One of our programmers has discovered that, if you add a filter after the entry e.g. https://od-api.oxforddictionaries.com:443/api/v1/entries/en/mess_about%2Faround_with/definitions, then you can get the API to respond. Unfortunately, this will not retrieve the entire entry for you but, depending on your needs, it may help in some way.

  • shahoodshahood Member ✭✭

    @AmosDuveen did you address this issue? It is gone as far as my app is concerned; however, it still gives a 400 in TryItOut feature of documentation page.

  • AmosDuveenAmosDuveen Member, Administrator, Moderator admin

    Hi @shahood,

    Not yet, it is going to require a lot of effort to fix because, at its core, this issue is a clash between our dictionary data and the formatting of URLs; neither is particularly easy to change or circumvent but we are still working on it.

Sign In or Register to comment.