()
| 9 | |
| 10 | |
| 11 | def get_data_dir(): |
| 12 | data_dir = os.path.join( |
| 13 | os.path.dirname(os.path.realpath(__file__)), "..", "..", "tests", "data" |
| 14 | ) |
| 15 | |
| 16 | # Verify that downloaded files are present. |
| 17 | translit_model = os.path.join(data_dir, "models", "transliteration-aren-all") |
| 18 | if not os.path.isdir(translit_model): |
| 19 | pytest.skip("Data files are not available") |
| 20 | |
| 21 | return data_dir |
| 22 | |
| 23 | |
| 24 | def write_tokens(batch_tokens, path): |