japaneasy
japaneasy copied to clipboard
Searching A Japanese Word Returns 'No items were found; try another query.'
STEPS
- run: npm install japaneasy
- Setup test.js file per instructions: var Dictionary = require('japaneasy'); var dict = new Dictionary();
dict('辞書').then(function(result){ console.log(result); }); 3) From console run: node test.js 4) Retry this time searching an English word. var Dictionary = require('japaneasy'); var dict = new Dictionary();
dict('english').then(function(result){ console.log(result); });
ACTUAL RESULTS Step #3 - returns the following: "No items were found; try another query." Step #4 - returns an array of results. Array has a length of 100.
Thanks for reporting this error -- currently away from my dev environment and won't get to looking into it for another couple days.
R
My pleasure. Can't wait to git it another try once fixed!
Any update on this?
Mocha suites are returning success for the glossing test:
Initialization
✓ is a function when initialized with no inputs
✓ is a function when initialized with blank object
✓ returns a function for valid dict entries
✓ throws an error when initialized with invalid parameters for dictionary
✓ returns a function for valid params for method
✓ throws an error for invalid params for method
✓ returns a function for valid params for encoding
✓ throws an error for invalid params for encoding
✓ returns a function for custom string inputs that are long enough
✓ throws an error for nonstring custom inputs
✓ returns a function for valid mirror locations
✓ throws an error for invalid mirror inputs
✓ throws an error for nonpositive noninteger timeout values
Url generator
✓ should generate a default url without any configuration
✓ should generate a url for basic japanese lookup
✓ should generate a url for basic english lookup
✓ should generate a url for different dictionaries
✓ should generate a url for different search methods
✓ should generate a url for different encoding types
✓ should have a no-repeat option for glossing
✓ should accurately switch between mirrors
✓ should overwrite other settings when a custom input is entered
Limits on querying
✓ throws an exception to blank string
✓ throws an exception to null, undefined, or no input
✓ throws an exception to non string types
Parsing responses
✓ accurately parses the response for 'hello'
✓ accurately parses the response when no response exists'
✓ accurately parses the response for scientific search 'chemolithotroph', input english
✓ accurately parses the response for glossing search '飛べねぇ豚はただのブタだ'
I too am getting the 200 OK + "No items are found," however, with the same input:
var wwwjdic = new japaneasy({
dictionary: "expanded-glossing",
encode: "UTF-8",
timeout: 1000,
language: "japanese"
});
wwwjdic('飛べねぇ豚はただのブタだ').then(function(result) {
console.log(result);
});
looking into it.
Hi, I have not actively updated this plugin for several years, so the API may have changed or otherwise become non-functional in the time being. If you identify the issue, please feel free to submit a PR!