2021-07-30 13:30:30 +00:00
|
|
|
option(ENABLE_NLP "Enable NLP functions support" ${ENABLE_LIBRARIES})
|
|
|
|
|
|
|
|
if (NOT ENABLE_NLP)
|
|
|
|
|
|
|
|
message (STATUS "NLP functions disabled")
|
|
|
|
return()
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/libstemmer_c/Makefile")
|
2021-10-17 23:29:04 +00:00
|
|
|
message (WARNING "submodule contrib/libstemmer_c is missing. to fix try run: \n git submodule update --init")
|
2021-07-30 13:30:30 +00:00
|
|
|
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't find internal libstemmer_c library, NLP functions will be disabled")
|
|
|
|
set (USE_NLP 0)
|
|
|
|
return()
|
|
|
|
endif ()
|
|
|
|
|
|
|
|
if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/wordnet-blast/CMakeLists.txt")
|
2021-10-17 23:29:04 +00:00
|
|
|
message (WARNING "submodule contrib/wordnet-blast is missing. to fix try run: \n git submodule update --init")
|
2021-07-30 13:30:30 +00:00
|
|
|
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't find internal wordnet-blast library, NLP functions will be disabled")
|
|
|
|
set (USE_NLP 0)
|
|
|
|
return()
|
|
|
|
endif ()
|
|
|
|
|
|
|
|
if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/lemmagen-c/README.md")
|
2021-10-17 23:29:04 +00:00
|
|
|
message (WARNING "submodule contrib/lemmagen-c is missing. to fix try run: \n git submodule update --init")
|
2021-07-30 13:30:30 +00:00
|
|
|
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't find internal lemmagen-c library, NLP functions will be disabled")
|
|
|
|
set (USE_NLP 0)
|
|
|
|
return()
|
|
|
|
endif ()
|
|
|
|
|
|
|
|
set (USE_NLP 1)
|
|
|
|
|
|
|
|
message (STATUS "Using Libraries for NLP functions: contrib/wordnet-blast, contrib/libstemmer_c, contrib/lemmagen-c")
|