Skip to content

Commit

Permalink
chore(): initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
AmitMY committed Mar 27, 2024
0 parents commit f2d7997
Show file tree
Hide file tree
Showing 8 changed files with 172 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Lint


on:
push:
branches: [ master, main ]
pull_request:
branches: [ master, main ]


jobs:
test:
name: Lint
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'

- name: Install Requirements
run: pip install .[dev]

- name: Lint Code
run: pylint signwriting_translation
26 changes: 26 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Test


on:
push:
branches: [ master, main ]
pull_request:
branches: [ master, main ]


jobs:
test:
name: Test
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'

- name: Install Requirements
run: pip install .[dev]

- name: Test Code
run: pytest signwriting_translation
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.idea/
build/
signwriting_translation.egg-info/
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2024 Sign Language Processing

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
30 changes: 30 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# SignWriting Translation

This project trains and serves models to translate SignWriting into spoken language text and vice versa.

## Usage

```bash
pip install git+https://github.com/sign-language-processing/signwriting-translation
```

To translate:

```bash
signwriting_to_text --spoken-language="en" --signed-language="ase" --input="M525x535S2e748483x510S10011501x466S2e704510x500S10019476x475"
text_to_signwriting --spoken-language="en" --signed-language="ase" --input="Sign Language"
```

### Examples

(These examples are taken from the DSGS Vokabeltrainer)

| | 00004 | 00007 | 00015 |
|:-----------:|:--------------------------------------------------------------------------------------------------------------------------------------------:|:--------------------------------------------------------------------------------------------------------------------------------------------:|:--------------------------------------------------------------------------------------------------------------------------------------------:|
| SignWriting | <img src="https://github.com/sign-language-processing/signwriting-transcription/blob/main/assets/examples/00004.png?raw=true" width="50px"> | <img src="https://github.com/sign-language-processing/signwriting-transcription/blob/main/assets/examples/00007.png?raw=true" width="50px"> | <img src="https://github.com/sign-language-processing/signwriting-transcription/blob/main/assets/examples/00015.png?raw=true" width="50px"> |
| Video | <img src="https://github.com/sign-language-processing/signwriting-transcription/blob/main/assets/examples/00004.gif?raw=true" width="150px"> | <img src="https://github.com/sign-language-processing/signwriting-transcription/blob/main/assets/examples/00007.gif?raw=true" width="150px"> | <img src="https://github.com/sign-language-processing/signwriting-transcription/blob/main/assets/examples/00015.gif?raw=true" width="150px"> |

## Data

We use the SignBank+ Dataset from [signbank-plus](https://github.com/sign-language-processing/signbank-plus).

41 changes: 41 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
[project]
name = "signwriting-translation"
description = "Translate from spoken to signed languages using SignWriting"
version = "0.0.1"
authors = [
{ name = "Amit Moryossef", email = "[email protected]" },
]
readme = "README.md"
dependencies = [
"signwriting @ git+https://github.com/sign-language-processing/signwriting",
]

dev = [
"pytest",
"pylint"
]

[tool.yapf]
based_on_style = "google"
column_limit = 120

[tool.pylint]
max-line-length = 120
disable = [
"C0114", # Missing module docstring
"C0115", # Missing class docstring
"C0116", # Missing function or method docstring
]

[tool.setuptools]
packages = [
"signwriting_translation"
]

[tool.pytest.ini_options]
addopts = "-v"
testpaths = ["signwriting_translation"]

[project.scripts]
signwriting_to_text = "signwriting_translation.bin:signwriting_to_text"
text_to_signwriting = "signwriting_translation.bin:text_to_signwriting"
Empty file.
25 changes: 25 additions & 0 deletions signwriting_translation/bin.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/usr/bin/env python

import argparse


def get_args():
parser = argparse.ArgumentParser()
parser.add_argument('--spoken-language', required=True, type=str, help='spoken language code')
parser.add_argument('--signed-language', required=True, type=str, help='signed language code')
parser.add_argument('--input', required=True, type=str, help='input text or signwriting sequence')
return parser.parse_args()


def signwriting_to_text():
# pylint: disable=unused-variable
args = get_args()


def text_to_signwriting():
# pylint: disable=unused-variable
args = get_args()


if __name__ == '__main__':
signwriting_to_text()

0 comments on commit f2d7997

Please sign in to comment.