https://github.com/wgarunap/singlish
This repository includes sinhala to singlish converter library.
https://github.com/wgarunap/singlish
singlish sinhala sinhala-language sinhala-to-singlish
Last synced: 3 months ago
JSON representation
This repository includes sinhala to singlish converter library.
- Host: GitHub
- URL: https://github.com/wgarunap/singlish
- Owner: wgarunap
- License: mit
- Created: 2021-03-31T15:46:58.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-04-02T18:45:50.000Z (over 4 years ago)
- Last Synced: 2025-04-24T05:33:55.080Z (6 months ago)
- Topics: singlish, sinhala, sinhala-language, sinhala-to-singlish
- Language: Go
- Homepage:
- Size: 88.9 KB
- Stars: 10
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
![]()
Convert Sinhala to Singlish in Golang
# Singlish
[](https://github.com/wgarunap/singlish/actions/workflows/go.yml/badge.svg)
[](https://github.com/wgarunap/singlish/blob/main/LICENSE)
[](https://github.com/wgarunap/singlish/releases)
### Overview
accuracy is not 100% guaranteed. Tested for main words and strings only.### Use Repository
```shell
go get -u github.com/wgarunap/singlish
```### Example
```go
package mainimport (
"fmt"
singlish "github.com/wgarunap/singlish"
)func main() {
txt:=singlish.TranslateString("මෙය url generate කිරීම උදෙසා ලියන ලද්දක් බැවින් නිරවද්යතාවය 100% තහවුරු කර නැත.")
fmt.Println(txt)
//Output
//meya url generate kiriima udhesa liyana ladhdhak bewin nirawadhyathawaya 100 thahawuru kara netha
txt2:=singlish.TranslateSinhalaStr("මෙය සිංහල එකකි")
fmt.Println(txt2)
//Output
//meya sinhala ekakitxt3:=singlish.TranslateString(`මෙය !"#$%&'()*+,-./:;<=>?@[\]^_{|}~ එකකි `)
fmt.Println(txt3)
// Output
//meya ekaki
}```
### Run Test
```shell
go test ./...
```### Benchmark
Run benchmarks
```shell
go test -bench=.
```
Benchmark Results
```shell
goos: darwin
goarch: amd64
pkg: github.com/wgarunap/singlish
cpu: Intel(R) Core(TM) i7-5557U CPU @ 3.10GHz
BenchmarkTranslate1Char-4 4068814 283.9 ns/op
BenchmarkTranslate4Char-4 1000000 1018 ns/op```
### Contributions
I am more than happy to receive contributions to this repository.
contact : wg.aruna.p@gmail.com