japaneasy icon indicating copy to clipboard operation
japaneasy copied to clipboard

Searching A Japanese Word Returns 'No items were found; try another query.'

Open kaijuking opened this issue 8 years ago • 5 comments

STEPS

  1. run: npm install japaneasy
  2. 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.

kaijuking avatar Mar 25 '16 21:03 kaijuking

Thanks for reporting this error -- currently away from my dev environment and won't get to looking into it for another couple days.

R

rewonc avatar Mar 27 '16 23:03 rewonc

My pleasure. Can't wait to git it another try once fixed!

kaijuking avatar Mar 30 '16 02:03 kaijuking

Any update on this?

ToastyStoemp avatar Nov 18 '16 00:11 ToastyStoemp

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.

cutecycle avatar Apr 11 '17 19:04 cutecycle

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!

rewonc avatar Apr 11 '17 23:04 rewonc