billingsmoore
commited on
Commit
•
a3b2ba5
1
Parent(s):
a89f493
Update README.md
Browse files
README.md
CHANGED
@@ -51,23 +51,18 @@ translation = translator(input_text)
|
|
51 |
print(translation)
|
52 |
```
|
53 |
|
54 |
-
Note that if your input text is not already transliterated, you can transliterate unicode Tibetan
|
|
|
55 |
|
56 |
```python
|
57 |
-
import
|
58 |
|
59 |
-
|
60 |
|
61 |
-
|
62 |
-
|
63 |
-
transliterated = converter.toWylie(input_text)
|
64 |
```
|
65 |
|
66 |
-
However, the model expects, and performs best on, Tibetan text that is transliterated in THL Simplified Phonetic Transcription rather than the Wylie
|
67 |
-
transliterations that pyewts implements. A Python module to convert Wylie to THL is currently under developement. In the mean time, if you are familiar with Perl,
|
68 |
-
[Roger Espel Llima has released a Perl module for this purpose here.](https://www.thlib.org/reference/transliteration/phconverter.php)
|
69 |
|
70 |
-
For now, the following script does reasonably well converting from the Wylie transliteration that is outputted by pyewts into something closer to phonetics.
|
71 |
|
72 |
```python
|
73 |
|
|
|
51 |
print(translation)
|
52 |
```
|
53 |
|
54 |
+
Note that if your input text is not already transliterated in THL Simplified Phonetic Transliteration, you can transliterate unicode Tibetan
|
55 |
+
or convert a Wylie transliteration using the thl-phonetic-transliteration module like so:
|
56 |
|
57 |
```python
|
58 |
+
from thl_phonetic_transliteration.converter import convert
|
59 |
|
60 |
+
non_thl = '<your Tibetan unicode or Wylie text>'
|
61 |
|
62 |
+
thl_text = convert(non_thl)
|
|
|
|
|
63 |
```
|
64 |
|
|
|
|
|
|
|
65 |
|
|
|
66 |
|
67 |
```python
|
68 |
|