Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
kaijuking opened this issue Mar 25, 2016 · 5 comments

Comments

@kaijuking
Copy link

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.

@rewonc
Copy link
Owner

rewonc commented Mar 27, 2016

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

R

@kaijuking
Copy link
Author

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

@ToastyStoemp
Copy link

Any update on this?

@cutecycle
Copy link

cutecycle commented Apr 11, 2017

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.

@rewonc
Copy link
Owner

rewonc commented Apr 11, 2017

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants