Created
April 10, 2025 13:58
-
-
Save ji6czd/f67eaea154dd056c4ad23468764b5902 to your computer and use it in GitHub Desktop.
Momo test sample.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
from momoPy import segment_braille_rule, convert_to_kana, to_jp_braille | |
def run(source: str): | |
segmented_string = segment_braille_rule(source) | |
braille_string = to_jp_braille(convert_to_kana(source)) | |
print(f"O: {source}") | |
print(f"S: {segmented_string}") | |
print(f"B: {braille_string}") | |
def main(): | |
for line in sys.stdin: | |
line = line.strip() | |
if not line: | |
continue | |
run(line) | |
if __name__ == "__main__": | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment