Running rbg2p on Colab
So I can at least consider having runnable versions of the Irish phonetisers
!pip install -q condacolab
import condacolab
condacolab.install()
%%capture
!conda install -c conda-forge go go-cgo -y
%%capture
!pip install --upgrade setuptools wheel
!go get github.com/sergi/go-diff
!go get github.com/stts-se/rbg2p
!git clone https://github.com/stts-se/rbg2p
import os
os.environ["PATH"]=f'{os.environ["PATH"]}:/root/go/bin'
%cd rbg2p
%%writefile maori.g2p
CHARACTER_SET "aeghikmnoprtuwāēīōū"
DEFAULT_PHONEME "_"
PHONEME_DELIMITER " "
wh -> f
h -> h
k -> k
m -> m
ng -> ŋ
n -> n
p -> p
r -> ɾ
t -> t
w -> w
au -> au
ā -> aː
a -> a
ē -> ɛː
e -> ɛ
ī -> iː
i -> i
ō -> ɔː
o -> ɔ
ū -> ʉː
u -> ʉ
g -> ∅
!echo kaumātua | go run cmd/g2p/g2p.go ../maori.g2p