Giter Club home page Giter Club logo

translation-words-helpers's Introduction

Contributors Forks Stargazers Issues MIT License

translation-words-helpers



Report Bug · Request Feature

TABLE OF CONTENTS ↧

About The Project

The library allows you to mark repeated words in TSV Translation Words Links and TSV OBS Translation Words Links from git.door43 in your app.

Purpose

  • mark repeated words in in TSV Translation Words Links and TSV OBS Translation Words Links for filtering

Problem

  • in some verses there a many repeated words

Scope

  • the library helps to mark and filter words for traslators in apps

Background

(back to top)

Built With

(back to top)

Getting Started

Installation

Add the library to your app

  • yarn
yarn add @texttree/translation-words-helpers
  • npm
npm install @texttree/translation-words-helpers

(back to top)

Usage

Example of usage

const { data } = await axios(
    'https://git.door43.org/unfoldingWord/en_obs-twl/raw/branch/master/twl_OBS.tsv'
  )
const json = tsvToJson(data)
const markedWords = markRepeatedWords(json)

json will have this structure:

[
  {
    Reference: '1:1',
    ID: 'aoaa',
    Tags: 'keyterm',
    OrigWords: 'God',
    Occurrence: '1',
    TWLink: 'rc://*/tw/dict/bible/kt/god'
  },...
]

and markedWords:

[
  {
    Reference: '1:1',
    ID: 'aoaa',
    Tags: 'keyterm',
    OrigWords: 'God',
    Occurrence: '1',
    TWLink: 'rc://*/tw/dict/bible/kt/god',
    isRepeatedInVerse: false
  },

At default this function add mark just in verse, but you can change it if you add type ('chapter', 'book', 'all'). For example:

const markedWords = markRepeatedWords(json, 'all')

returns

[...
  {
    Reference: '4:4',
    ID: 'o16m',
    Tags: 'keyterm',
    OrigWords: 'bless',
    Occurrence: '1',
    TWLink: 'rc://*/tw/dict/bible/kt/bless',
    isRepeatedInVerse: false,
    isRepeatedInChapter: false,
    isRepeatedInBook: true
  },...
]

More examples you can get from tests.

(back to top)

Roadmap

See the open issues for a full list of proposed features (and known issues).

(back to top)

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated. Guidelines for external contributions.

You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

If you would like to fork the repo and create a pull request.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

License

Distributed under the MIT License. See LICENSE for more information.

(back to top)

Contact

Project Link: https://github.com/texttree/translation-words-helpers

(back to top)

translation-words-helpers

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.