graph LR
Thulac_Instance_Manager["Thulac Instance Manager"]
Public_Segmentation_API["Public Segmentation API"]
Convenience_Wrapper_API["Convenience/Wrapper API"]
Thulac_Instance_Manager -- "orchestrates setup of" --> Public_Segmentation_API
Thulac_Instance_Manager -- "orchestrates setup of" --> Convenience_Wrapper_API
Convenience_Wrapper_API -- "leverages" --> Public_Segmentation_API
The THULAC Public API subsystem serves as the primary user-facing interface and orchestrator for the THULAC text processing pipeline. It is primarily defined by the thulac/__init__.py module, which encapsulates the core functionalities and their exposure to external users.
This component is responsible for the lifecycle management and initial configuration of the THULAC instance. It handles the setup of internal states, including paths and prefixes, ensuring the environment is correctly prepared for text processing operations. It acts as the foundational orchestrator for the entire API.
Related Classes/Methods:
This component provides the fundamental, direct methods for text segmentation (cut, fast_cut). It represents the core interface through which users access THULAC's primary text processing capabilities. It is the direct entry point for raw text segmentation.
Related Classes/Methods:
This component offers higher-level abstractions and utility methods (run, cut_f, fast_cut_f, cutline, func_cutline) designed to simplify common usage patterns. It builds upon the core segmentation capabilities to facilitate tasks like processing entire files or handling text line-by-line, enhancing overall usability.
Related Classes/Methods: