How to find definitions of phrasal verbs retrieved using 'search' endpoint?
Categories
- 320 All Categories
- 2 Language datasets
- 9 News and updates
- 18 API endpoints
- 15 Review my code
- 6 Tutorials and presentations
- 92 Frequently asked questions
- 5 How to get useful technical help
- 2 Member guidelines
- 12 Suggest an improvement
- 58 Report a bug
- 9 Ask the Community: Other
- 54 Ask the Community: Technical and operational questions
- 60 General
How to find definitions of phrasal verbs retrieved using 'search' endpoint?
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!
Comments
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.
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!
Hi @shahood,
I think that sounds like a sensible solution.
Ok thanks.
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.@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.
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.