from lindera import load_dictionary
from lindera import Tokenizer
def main():
dictionary = load_dictionary("embedded://ipadic")
tokenizer = Tokenizer(dictionary, mode="decompose")
text = "関西国際空港限定トートバッグを東京スカイツリーの最寄り駅であるとうきょうスカイツリー駅で買う"
print(f"text: {text}\n")
tokens = tokenizer.tokenize(text)
for token in tokens:
print(token.surface)
if __name__ == "__main__":
main()