Giter VIP home page Giter VIP logo

Comments (4)

prajdabre avatar prajdabre commented on July 30, 2024

This is not the right way to open an issue.

You should:

  1. Specify your use case.
  2. Share your code snippet.
  3. Share an example input and the desired output.

from indictrans2.

Sab8605 avatar Sab8605 commented on July 30, 2024

I understand the need for clarity when opening an issue. Here are the details you requested:

  1. I am using the IndicTrans2 model for translation of English to Odia.
  2. Example : For some of translations model generates ଯ଼ alphabets in responses which is not exist in Odia language. ଯ with the dot under it is not a character in Odia and instead should be replaced with ୟ.

input : Local media reports an airport fire vehicle rolled over while responding.
output : ସ୍ଥାନୀଯ଼ ଗଣମାଧ୍ଯ଼ମ ରିପୋର୍ଟ କରିଛି ଯେ ପ୍ରତିକ୍ରିଯ଼ା ଦେବା ସମଯ଼ରେ ଏକ ବିମାନ ବନ୍ଦର ଅଗ୍ନିଶମ ଗାଡି ଓଲଟି ପଡ଼ିଥିଲା।

input: British newspaper The Guardian suggested Deutsche Bank controlled roughly a third of the 1200 shell companies used to accomplish this.
output:ବ୍ରିଟିଶ ଖବରକାଗଜ ଦି ଗାର୍ଡିଆନ୍ ପରାମର୍ଶ ଦେଇଛି ଯେ ଡଏଚ୍ ବ୍ଯ଼ାଙ୍କ 1200 ଟି ନକଲି କମ୍ପାନୀ ମଧ୍ଯ଼ରୁ ପ୍ରାଯ଼ ଏକ ତୃତୀଯ଼ାଂଶକୁ ନିଯ଼ନ୍ତ୍ରଣ କରିଥିଲା।

from indictrans2.

PranjalChitale avatar PranjalChitale commented on July 30, 2024

Please check the following commit, this has been resolved if you use our inference pipeline.

For a short-term fix, please make the necessary changes on your end.

For a permanent solution, the Unicode transliterator for Oriya in the IndicNLP library needs to be debugged, or a similar workaround can be implemented there as well.

Feel free to open a PR.

from indictrans2.

Sab8605 avatar Sab8605 commented on July 30, 2024

Thanks for a quick response,

I have tried this changes but this not solved issue for me, as this changes replace before transliterator, But it solve me when I apply it after using transliterator.
Please find code below,

if lang == "eng_Latn":
            for sent in sents:
                postprocessed_sents.append(self.en_detok.detokenize(sent.split(" ")))
        else:
            for sent in sents:
                outstr = indic_detokenize.trivial_detokenize(
                    self.xliterator.transliterate(sent, flores_codes[common_lang], flores_codes[lang]), flores_codes[lang]
                )
                # Oriya bug: indic-nlp-library produces ଯ଼ instead of ୟ when converting from Devanagari to Odia
                # TODO: Find out what's the issue with unicode transliterator for Oriya and fix it
                if lang_code == "ory":
                    
                    outstr = outstr.replace("ଯ଼", 'ୟ')
                postprocessed_sents.append(outstr)

        return postprocessed_sents
    Thanks once again for solution.

from indictrans2.

Related Issues (20)

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.