"""GTJA Alpha191 因子转换器。

将国泰君安的 Alpha191 因子公式转换为框架可识别的 DSL 字符串表达式。

模块结构:
    - preprocessor: GTJA 语法清洗工具
    - converter: 转换主程序

使用示例:
    >>> from src.scripts.GtjaConvertor import GtjaConverter
    >>> converter = GtjaConverter()
    >>> # 输入 GTJA 原始表达式
    >>> dsl_str = converter.convert("(-1 * CORR(RANK(DELTA(LOG(VOLUME), 1)), RANK(((CLOSE - OPEN) / OPEN)), 6))")
    >>> print(dsl_str)
    (-1 * ts_corr(cs_rank(ts_delta(log(vol), 1)), cs_rank(((close - open) / open)), 6))
"""

from .preprocessor import clean_gtja_formula
from .converter import convert_to_dsl, GtjaConverter, parse_multiline_formulas

__all__ = [
    "clean_gtja_formula",
    "convert_to_dsl",
    "GtjaConverter",
    "parse_multiline_formulas",
]
