WordsAPI

부분 유료
Verified
분류별 dpventures | 업데이트됨 25日前 | Data
인기

9.9 / 10

지연 시간

177ms

서비스 수준

100%

Health Check

N/A

모든 토론으로 돌아가기

Frequency does not seem correct

Rapid account: Softsafari
softsafari
7年前

Hello,

Even if I add the frequency, the word that is returned has the frequency in some case and none in others? For instance the below request

https://wordsapiv1.p.mashape.com/words/?frequencymin=7&partofspeech=noun&letterPattern=[1]{3,14}$&hasDetails=synonyms&random=true

{“word”:“each”,“results”:[{“definition”:“to or from every one of two or more (considered individually)”,“partOfSpeech”:“adverb”,“synonyms”:[“apiece”,“for each one”,“from each one”,“to each one”],“examples”:[“they received $10 each”]},{“definition”:"(used of count nouns) every one considered individually",“partOfSpeech”:“adjective”,“similarTo”:[“all”],“examples”:[“each person is mortal”,“each party is welcome”]}],“syllables”:{“count”:1,“list”:[“each”]},“pronunciation”:{“all”:“it?”},“frequency”:5.47}

has the frequency is 5.47 even though the frequencymin=7 ?


  1. a-zA-Z

Rapid account: Softsafari
softsafari Commented 7年前

Just checked it out and it looks good!

Thanks guys for the quick fixes.

Rapid account: Wordsapi
wordsapi Commented 7年前

Looks like the system was filtering by frequency wrong, sorry about that. Should be fixed now.

Rapid account: Softsafari
softsafari Commented 7年前

The frequency seems fine now. Thanks.

But I tried several different combinations and could not see how frequency is working.

For instance,I repeatedly ran this

https://wordsapiv1.p.mashape.com/words/?frequencyMax=7&frequencyMin=5&partofspeech=noun&letterPattern=[1]{3,12}$&hasDetails=synonyms&random=true

and got back this

5.42
5.66
1.74
2.02

Then I reversed it

https://wordsapiv1.p.mashape.com/words/?frequencyMax=5&frequencyMin=7&partofspeech=noun&letterPattern=[2]{3,12}$&hasDetails=synonyms&random=true

and got these

1.74
1.74
1.74
2.02

What I want to do is get words that are in the range from 5 to 7?

How would I do that?

I believe this is just the opposite right?

" Since the scale is from about 1 to about 8, where a lower number means a word is seen more frequently than a higher number…"

The higher the number the more frequent it is…

Thanks


  1. a-zA-Z

  2. a-zA-Z

Rapid account: Wordsapi
wordsapi Commented 7年前

Hi again,
Looks like the frequency attribute was being stripped in some cases. Thank you for reporting the problem! It should be fixed now.

As to frequencyMin returning words with lower frequencys, I think the issue is that it just works the opposite of the way you think it does. Asking for a word with a frequencyMin of 7 means “give me a words whose frequency is at least a 7”. Since the scale is from about 1 to about 8, where a lower number means a word is seen more frequently than a higher number, a frequency of 2 is valid if you ask for a frequencyMin of 7.

Here’s some more info:
http://blog.wordsapi.com/2015/01/expanded-frequency-information.html

Rapid account: Softsafari
softsafari Commented 7年前

Hello, Thanks for the reply.

I changed the parameter to be camel cased and made this request

https://wordsapiv1.p.mashape.com/words/?frequencyMin=7&partofspeech=noun&letterPattern=[1]{3,14}$&hasDetails=synonyms&random=true

and got back this response

{“word”:“pandowdy”,“results”:[{“definition”:“deep-dish apple dessert covered with a rich crust”,“partOfSpeech”:“noun”,“synonyms”:[“dowdy”],“typeOf”:[“pastry”]}],“syllables”:{“count”:3,“list”:[“pan”,“dow”,“dy”]},“pronunciation”:{“all”:“pæn’da?di”}}

1- It doesn’t have the frequencey.
2- I called the frequency end point and got back this response

{
“word”: “pandowdy”,
“frequency”: 2.02
}
It says the frequency is 2.02 but I requested frequencyMin=7

How can I fix this?


  1. a-zA-Z

Rapid account: Wordsapi
wordsapi Commented 7年前

Hi softsafari,
Looks like our documentation has an error. The parameters should be ‘frequencyMin’ and ‘frequencyMax’, camel cased like the rest of the params we use. Sorry about that, I’ll get the documentation fixed.

Rapid account: Softsafari
softsafari Commented 7年前

Also, playing around with api in the search page below

https://market.mashape.com/wordsapi/wordsapi#search

the frequency has no affect on the results that are returned.

아래에 의견을 추가하고 토론에 참여하세요.

새 댓글을 게시하려면 로그인 / 가입