Skip to content

Commit df1b759

Browse files
committed
Merge pull request #4 from memeda/master
subproject segmentor from LTP
2 parents 19a80ab + 8fa5818 commit df1b759

File tree

107 files changed

+8427
-5984
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

107 files changed

+8427
-5984
lines changed

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
# build #
1212
###############
1313
build
14-
config.h
1514

1615
###############
1716
# config #

CMakeLists.txt

+14-14
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
11
cmake_minimum_required (VERSION 2.8.0)
2-
project ("LTP - Chinese Word Segmentation Component.")
2+
project ("LTP - Language Technology Platform")
33

44
# project attributes section
55
# -- config cmake modules path
6-
set (CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
6+
set (CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
77

88
if (APPLE)
9-
set(CMAKE_CXX_FLAGS "-std=c++11 -stdlib=libstdc++ -Wno-error=c++11-narrowing")
9+
add_definitions(-DGTEST_HAS_TR1_TUPLE=0)
10+
set(CMAKE_CXX_FLAGS "-std=c++11 -Wno-c++11-narrowing")
1011
endif(APPLE)
1112

12-
if (MINGW)
13-
set(CMAKE_CXX_FLAGS "-std=c++11 -Wno-narrowing -fpermissive")
14-
endif (MINGW)
15-
1613
# -- config output directories
1714
set (EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
18-
set (LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib)
19-
set (INCLUDE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/include)
15+
set (LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib)
16+
set (INCLUDE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/include)
2017

2118
# -- config source directories
22-
set (SOURCE_DIR ${PROJECT_SOURCE_DIR}/src)
23-
set (THIRDPARTY_DIR ${PROJECT_SOURCE_DIR}/thirdparty)
19+
set (SOURCE_DIR ${PROJECT_SOURCE_DIR}/src)
20+
set (THIRDPARTY_DIR ${PROJECT_SOURCE_DIR}/thirdparty)
21+
set (TOOLS_DIR ${PROJECT_SOURCE_DIR}/tools)
2422

2523
# -- config resource directories
26-
set (CONFIGURE_DIR ${PROJECT_SOURCE_DIR}/conf)
24+
set (CONFIGURE_DIR ${PROJECT_SOURCE_DIR}/conf)
25+
set (MODEL_DIR ${PROJECT_SOURCE_DIR}/ltp_data)
26+
set (DATA_DIR ${PROJECT_SOURCE_DIR}/test_data)
2727

2828
# compiling section
2929
# -- compile shipped libraries
@@ -32,5 +32,5 @@ add_subdirectory (thirdparty)
3232
# -- compile source code
3333
add_subdirectory (src)
3434

35-
# compile testing
36-
add_subdirectory (test)
35+
# testing section
36+
# -- generate configure file for ltp_test

Makefile

-40
This file was deleted.

keep_stable.txt

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
keep_stable.txt
2+
README.md
3+
configure
4+
.gitignore

src/CMakeLists.txt

+16-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
1-
set (utils_DIR ${SOURCE_DIR}/utils)
2-
set (segmentor_DIR ${SOURCE_DIR}/segmentor)
1+
set (utils_DIR ${SOURCE_DIR}/utils)
2+
set (xml4nlp_DIR ${SOURCE_DIR}/xml4nlp/)
3+
set (segmentor_DIR ${SOURCE_DIR}/segmentor)
4+
set (postagger_DIR ${SOURCE_DIR}/postagger)
5+
set (parser_DIR ${SOURCE_DIR}/parser)
6+
set (parser_n_DIR ${SOURCE_DIR}/parser_n)
7+
set (splitsnt_DIR ${SOURCE_DIR}/splitsnt)
8+
set (ner_DIR ${SOURCE_DIR}/ner/)
9+
set (srl_DIR ${SOURCE_DIR}/srl/)
10+
set (ltp_DIR ${SOURCE_DIR}/ltp/)
11+
set (server_DIR ${SOURCE_DIR}/server/)
312

413
add_subdirectory ("segmentor")
514

15+
# mongoose server is not supported in windows
16+
if (UNIX)
17+
endif()
18+
19+

src/config.h

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#ifndef __LTP_CONFIG_H__
2+
#define __LTP_CONFIG_H__
3+
4+
#define LTP_VERSION "3.3.1"
5+
6+
#define BOOST_ALL_NO_LIB
7+
8+
namespace ltp {
9+
10+
const double EPS = 1e-8;
11+
const double NEG_INF = -1e20;
12+
13+
}
14+
15+
#endif // end for __LTP_CONFIG_H__

0 commit comments

Comments
 (0)