kmadathil / sanskrit_parser

Parsers for Sanskrit / संस्कृतम्
MIT License
69 stars 21 forks source link

Additional information about verbs via API / module #72

Open drdhaval2785 opened 6 years ago

drdhaval2785 commented 6 years ago

Just to let you know that now the recently launched APIs for verb related information. This may be integrated with the information regarding the verb form (currently it comes from INRIA xml data AFAIK). Kindly fiddle with the API and let me know the feedback.

machine readable Paninian derivation - api.sanskritworld.in/v0.0.1/Bavati/prakriya/machine human readable Paninian derivation - api.sanskritworld.in/v0.0.1/Bavati/prakriya all information - api.sanskritworld.in/v0.0.1/Bavati list available URIs - api.sanskritworld.in/v0.0.1

drdhaval2785 commented 6 years ago

A sample derivation of BavAmi is given below resource

Result is below

{
  "message": "for machine friendly output, use api.sanskritworld.in/v0.0.1/verbform/prakriya/machine",
  "result": [
    [
      "BUvAdayo DAtavaH (1.3.1) -> BU",
      "sanAdyantA DAtavaH (3.1.32) -> BU",
      "laH karmaRi ca BAve cAkarmakeByaH. (3.4.69) -> BU",
      "vartamAne law (3.2.123) -> BU+la!w",
      "lasya (3.4.77) -> BU+la!w",
      "halantyam (1.3.3) -> BU+la!w",
      "tasya lopaH (1.3.9) -> BU+la!",
      "upadeSe'janunAsika it (1.3.2) -> BU+la!",
      "tasya lopaH (1.3.9) -> BU+l",
      "tiptasJisipTasTamibvasmas tAtAMJaTAsATAMDvamiqvahimahiN (3.4.78) -> BU+mip",
      "laH parasmEpadam (1.4.99) -> BU+mip",
      "tiNastrIRi trIRi praTamamaDyamottamAH (1.4.101) -> BU+mip",
      "tAnyekavacanadvivacanabahuvacanAnyekaSaH (1.4.102) -> BU+mip",
      "asmadyuttamaH (1.4.107) -> BU+mip",
      "tiNSitsArvaDAtukam (3.4.113) -> BU+mip",
      "kartari Sap‌ (3.1.68) -> BU+Sap+mip",
      "tiNSitsArvaDAtukam (3.4.113) -> BU+Sap+mip",
      "laSakvatadDite (1.3.8) -> BU+Sap+mip",
      "tasya lopaH (1.3.9) -> BU+ap+mip",
      "halantyam (1.3.3) -> BU+ap+mip",
      "tasya lopaH (1.3.9) -> BU+a+mi",
      "sArvaDAtukArDaDAtukayoH (7.3.84) -> Bo+a+mi",
      "eco'yavAyAvaH (6.1.78) -> Bav+a+mi",
      "ato dIrGo yaYi (7.3.101) -> BavA+mi",
      "Final form (~2) -> BavAmi"
    ]
  ],
  "uris": {
    "JNU_link": "api.sanskritworld.in/v0.0.1/BavAmi/jnu",
    "UoHyd_link": "api.sanskritworld.in/v0.0.1/BavAmi/uohyd",
    "all_details": "api.sanskritworld.in/v0.0.1/BavAmi",
    "dhatupradipa_link": "api.sanskritworld.in/v0.0.1/BavAmi/dhatupradipa",
    "it_id": "api.sanskritworld.in/v0.0.1/BavAmi/it_id",
    "it_status": "api.sanskritworld.in/v0.0.1/BavAmi/it_status",
    "it_sutra": "api.sanskritworld.in/v0.0.1/BavAmi/it_sutra",
    "kshiratarangini_link": "api.sanskritworld.in/v0.0.1/BavAmi/kshiratarangini",
    "lakAra_or_tense": "api.sanskritworld.in/v0.0.1/BavAmi/lakara",
    "madhaviyadhatuvritti_link": "api.sanskritworld.in/v0.0.1/BavAmi/madhaviya",
    "padadecider_id": "api.sanskritworld.in/v0.0.1/BavAmi/padadecider_id",
    "padadecider_sutra": "api.sanskritworld.in/v0.0.1/BavAmi/padadecider_sutra",
    "prakriya_human_readable": "api.sanskritworld.in/v0.0.1/BavAmi/prakriya",
    "prakriya_machine_readable": "api.sanskritworld.in/v0.0.1/BavAmi/prakriya/machine",
    "upasarga": "api.sanskritworld.in/v0.0.1/BavAmi/upasarga",
    "verb_devanagari": "api.sanskritworld.in/v0.0.1/BavAmi/verb",
    "verb_gana": "api.sanskritworld.in/v0.0.1/BavAmi/gana",
    "verb_meaning": "api.sanskritworld.in/v0.0.1/BavAmi/meaning",
    "verb_number": "api.sanskritworld.in/v0.0.1/BavAmi/number",
    "verb_slp": "api.sanskritworld.in/v0.0.1/BavAmi/verbslp"
  }
kmadathil commented 6 years ago

Awsome! Dr. Dhaval! Once you create a package, we can use this to show detailed derivations of verb forms.Is there something planned for noun forms?

@vvasuki @avinashvarna @codito : Thoughts on how we could incorporate this? I'm thinking we could optionally use the prakriya package to show detailed verb form derivations.

vvasuki commented 6 years ago

@drdhaval2785 's work is wonderful and useful. You can use it to improve your UI - where the user sees tinanta derivation by mouse-overing. But UI is not your main focus in this project (<-- I recall you said that this was just a feedback mechanism for now) - and I would encourage you to keep it that way. Focus on the parsing.

If you're really interested in the UI stuff, spin off a new project and produce a javascript module or better - a web component to show the prakriyA on demand- which can be used in ANY UI with a couple of lines of code.

vvasuki commented 6 years ago

The final forms and their association with particular (dhAtu, vivakShA) pairs are of course something that the parser should be able to output (And one can use a dict which @drdhaval2785 will produce https://github.com/drdhaval2785/SanskritVerb/issues/1056 ) - but that doesn't necessitate showing the prakriyA (that can be accomplished by any interested downstream user by using @drdhaval2785 's yet-to-be-published library directly.)

vvasuki commented 6 years ago

PS: For those relying on email notifications - edited the last comment.

drdhaval2785 commented 5 years ago

Python package was launched some time back. https://prakriya.readthedocs.io/en/latest/ is the documentation.