GithubHelp home page GithubHelp logo

tldr-pages / tldr-translation-pairs-gen Goto Github PK

View Code? Open in Web Editor NEW
3.0 3.0 3.0 96 KB

Generates a structured dataset in various formats derived from tldr-pages.

Home Page: https://opus.nlpl.eu/tldr-pages/corpus/version/tldr-pages

License: MIT License

TypeScript 93.53% JavaScript 6.47%
hacktoberfest parallel-corpus tldr tldr-pages

tldr-translation-pairs-gen's People

Contributors

dependabot[bot] avatar kbdharun avatar sethfalco avatar waldyrious avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

tldr-translation-pairs-gen's Issues

Include translatable tokens in dataset

In commands, tokens can be translated.

We can index and pull out the tokens from each command string, and include those mappings in the output as well.

Example

- Add a new task to the work list:

`todo new {{thing_to_do}} --list {{work}}`
- Aggiungere un nuovo task alla lista delle cose da fare per lavoro:

`todo new {{cose_da_fare}} --list {{lavoro}}`
  • thing_to_do → cose_da_fare
  • work → lavoro

Remove square brackets in command description

Some commands have square brackets in the command description, which is a hint to what argument it's referring too. However, this information isn't helpful when pairing translations. This may be worth removing while building the corpus.

Example

pages/common/am.md

`am start -n {{com.android.settings/.Settings}}`

- Start an activity and pass [d]ata to it:

pages.de/common/am.md

- Starte eine Aktivität und übergib ihr Daten:

`am start -a {{android.intent.action.VIEW}} -d {{tel:123}}`

The resulting dataset then has:

<tu>
  <tuv xml:lang="de">
    <seg>Starte eine Aktivität und übergib ihr Daten </seg>
  </tuv>
  <tuv xml:lang="en">
    <seg>Start an activity and pass [d]ata to it </seg>
  </tuv>
</tu>

Duplicate translation units in output

In the project we have certain lines that are repeated frequently, namely the template text like for alias pages.

We should do something to avoid writing out duplicates. Cases where lines are similar but not the same like "More Info…" is perfectly fine since the link is changing, but cases like the alias pages are just 100% the exact same.

feat: allow multiple export formats in a single process

The --format argument currently only accepts 1 format at a time. In the scenario that we want to produce multiple datasets, this means redundantly processing the files multiple times.

To reduce wasted computation/energy, we should support either multiple formats or an all that processes the files once, but exports in all formats specified.

Publish builds

We need to publish builds of this somewhere, likely npm so that it's more convenient to use.

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.