Skip to content

v5.2.0

Compare
Choose a tag to compare
@hyunwoongko hyunwoongko released this 02 Apr 00:34
· 65 commits to main since this release
  • Add is_compliable() function to check Cython implementation is available for the user environment.
def is_compilable():
    try:
        # 1. Try to compile csrc/sentence_splitter.cpp
        extra_compile_args, extra_link_args = get_extra_compile_args()
        compiler = new_compiler()
        customize_compiler(compiler)
        compiler.compile(['csrc/sentence_splitter.cpp'], extra_postargs=extra_compile_args)
        return True
    except:
        # 2. Cannot compile csrc/sentence_splitter.cpp
        return False