Giter VIP home page Giter VIP logo

jibikiapi's People

Contributors

bytealex avatar winteryfox avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

aatch extiriority

jibikiapi's Issues

Name clash

Hello WinteryFox,

I see you started a Japanese-English dictionary named Jibiki that's still in beta, which looks nice. I would like to inform you that there is already an open-source project in the same space (Japanese dictionary) with the same name, in which I'm a contributor.

jibiki.fr is the instance dedicated to the improvement of a Japanese-French dictionary.

jibiki (software) is the underlying lexical editing platform, created by @mangeot

So, you might wanted to reconsider the public naming of your project when going out of beta, as it's already used for an open-source project mentioned in multiples scientific publications.

Regards,
LL

Wiki page for Mac install

Install via brew: mecab mecab-ipadic (needs the latter, too)

Download and unzip textsearch_ja
Edit the Makefile and add -pthread after SHLIB_LINK = -lmecab (space-separate)
Run make && make install.
If you get file not found: stdio.h with another clang warning earlier "isysroot not found", then you need to install xcode and xcode-select --install. also need to accept its license.
After that's done create the extension via echo "CREATE EXTENSION textsearch_ja" | psql -u $YOUR_USER

You need these pg users: postgres jmdictdb jmdictdbv jibiki

Then you can psql -U $YOUR_USER < dumb.sql

Allowing CORS on APIs

Hey there,

I'm building a webapp that uses Jibiki for retrieving Japanese sentences--I previously made a command line tool (https://github.com/jamesrwaugh/kyoro/blob/master/acquisition/jikibisentenceretriever.go#L39) that used the API, but I see CORS is not enabled so my new app can't complete the request.

I noticed only support for credentials is enabled here:
https://github.com/WinteryFox/JibikiAPI/blob/master/src/main/kotlin/app/jibiki/controller/ApiController.kt#L10

Have you considered allowing all origins here, or another way to access the API from a web app?

Thanks again

Queries not including results with ()

Simply searching for dog currently does not include the actual word for dog (犬) because its glossary entry contains some text between brackets in its actual gloss entry. dog (Canis (lupus) familiaris) I could simply throw in a wildcard to fix this however that would make the queries turn into seconds instead of milliseconds. Maybe an index could fix this?

Document URL escape requirement of Japanese strings in API

Hi,

Nice work so far, thanks! Trying out the API, I found I received nothing but a 400 Bad Request when trying to use the sentence API with Japanese text as a query, while English text worked fine. I found I needed to URL escape the text, and it works well.

I suppose this is expected as Jisho for example has the same behavior, but it might help if the docs made a note of it.

curl https://api.jibiki.app/sentences?query=やすい
400 Bad Request

curl https://api.jibiki.app/sentences?query=%E3%82%84%E3%81%99%E3%81%84
200 OK

Word search ordering and sorting

Currently, word searches are completely unsorted and will appear in a random order. I've been trying to figure out a proper way to order words (by frequency and/or relevance) however I've been unsuccessful so far. I've tried using the freq table to sort on the columns kw and value however that does not work properly.
Trying to figure out a proper way to sort words is tricky and will require more attention.

Ordering by kw and value does not yield favourable results;

SELECT entries.entr
FROM (SELECT entr
      FROM kanj
      WHERE lower(txt) $equals lower(:q)
      UNION ALL
      SELECT entr
      FROM rdng
      WHERE txt $equals hiragana(:reading)
         OR txt $equals katakana(:reading)
      UNION ALL
      SELECT entr
      FROM gloss
      WHERE lower(txt) $equals lower(:q)) entries
         LEFT JOIN freq ON freq.entr = entries.entr AND freq.rdng IS NOT NULL AND freq.kanj IS NULL
ORDER BY freq.kw, freq.value

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.