diff --git a/README.md b/README.md index 6def713288c9c71c0e872fcfa860cf6c14de4ac6..57b1fbb718ed3d0f5ab7ec94ff9b7f7082984d0d 100644 --- a/README.md +++ b/README.md @@ -200,8 +200,11 @@ from unitex.processor import UnitexProcessor files = [ ... ] grammar = load_persistent_fst2("/path/to/grammar.fst2") +config = UnitexConfig() +config.load("/path/to/unitex.yaml") + # Persistence is achieved during object initialization -processor = UnitexProcessor("/path/to/unitex.yaml") +processor = UnitexProcessor(config) kwargs = {} kwargs["xml"] = False diff --git a/unitex/processor.py b/unitex/processor.py index f0a813755e90bb2e7c8d68c3ab911421bd0afaf4..3a5b2df0bb7e93da4ae528e079ce5239865efa69 100644 --- a/unitex/processor.py +++ b/unitex/processor.py @@ -380,9 +380,9 @@ class UnitexProcessor(object): *Return [TextFST]:* - The function returns a TextFST object. The object uses the - text.tfst and text.tind files which are cleaned (i.e. erased) - when the processor is closed. + WARNING: The function returns a TextFST object. The object uses + the text.tfst and text.tind files which are cleaned (i.e. erased) + when the processor is closed. """ kwargs = self.__config["tools"]["normalize"]