Skip to content

Commit

Permalink
remove unused file in train/assets
Browse files Browse the repository at this point in the history
  • Loading branch information
Oneplus committed Aug 27, 2013
1 parent 693ab63 commit 36d3935
Show file tree
Hide file tree
Showing 10 changed files with 43 additions and 1,090 deletions.
24 changes: 14 additions & 10 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,27 @@
build
config.h

###############
# config #
###############
*.cnf

###############
# output #
###############
include/
lib/
bin/
crf_learn
crf_test
gparser
lgdpj
lgsrl
otcws
otpos
otner
ltp-model
maxent
svm_learn
auto-test.sh
SRLExtract
SRLGetInstance
ltp-model.json
config.svmt
gparser.conf

###############
# data file #
###############
new_ltp_data/
ltp_data/
4 changes: 0 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@ add_subdirectory (src)

# testing section
# -- generate configure file for ltp_test
configure_file (
${CONFIGURE_DIR}/ltp_all_modules.conf.in
${EXECUTABLE_OUTPUT_PATH}/ltp_all_modules.conf)

configure_file (
${TOOLS_DIR}/testing/auto-test.sh.in
${TOOLS_DIR}/testing/auto-test.sh)
Expand Down
14 changes: 12 additions & 2 deletions src/__util/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
SET(util_source
set (util_VERSION "0.0.1")

set (util_source
conversion_utf.h
decode_gbk.h
encode.cpp
Expand All @@ -20,4 +22,12 @@ SET(util_source
encode.cpp
encode.hpp)

ADD_LIBRARY(util ${util_source})
add_library (util_static_lib STATIC ${util_source})
set_target_properties (util_static_lib PROPERTIES OUTPUT_NAME util)

add_library (util_shared_lib SHARED ${util_source})
set_target_properties (util_shared_lib PROPERTIES
VERSION ${util_VERSION}
OUTPUT_NAME util)


33 changes: 15 additions & 18 deletions src/_srl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ include_directories (
${THIRDPARTY_DIR}/boost/include
${THIRDPARTY_DIR}/maxent)

set (srl_VERSION "0.0.1")

set (srl_SRC
Configuration.cpp
Configuration.h
Expand All @@ -31,9 +33,19 @@ set (srl_SRC
SRL_DLL_x.cpp
tree.hh)

add_library (srl ${srl_SRC})
add_library (srl_static_lib STATIC ${srl_SRC})

set_target_properties (srl_static_lib PROPERTIES
OUTPUT_NAME srl)

add_library (srl_shared_lib SHARED ${srl_SRC})

target_link_libraries (srl util maxent)
set_target_properties (srl_shared_lib PROPERTIES
VERSION ${srl_VERSION}
OUTPUT_NAME srl)

target_link_libraries (srl_static_lib util_static_lib maxent)
target_link_libraries (srl_shared_lib util_shared_lib maxent)

configure_file (
SRL_DLL.h
Expand All @@ -43,25 +55,10 @@ link_directories (${LIBRARY_OUTPUT_PATH})

# Training suite is not supported in windows
if (NOT WIN32)
#set (SRLExtract_SRC SRLExtract.cpp Corpus.cpp)
#add_executable (SRLExtract ${SRLExtract_SRC})
#target_link_libraries (SRLExtract srl)
#set_target_properties (SRLExtract
# PROPERTIES
# RUNTIME_OUTPUT_DIRECTORY ${TOOLS_DIR}/train/)
#
#set (SRLGetInstance_SRC SRLGetInstance.cpp GetInstance.cpp)
#add_executable (SRLGetInstance ${SRLGetInstance_SRC})
#target_link_libraries (SRLGetInstance srl)
#set_target_properties (SRLGetInstance
# PROPERTIES
# RUNTIME_OUTPUT_DIRECTORY ${TOOLS_DIR}/train/)

set (lgsrl_SRC lgsrl.cpp Corpus.cpp GetInstance.cpp)
add_executable (lgsrl ${lgsrl_SRC})
target_link_libraries (lgsrl maxent srl)
target_link_libraries (lgsrl maxent srl_static_lib)
set_target_properties (lgsrl
PROPERTIES
RUNTIME_OUTPUT_DIRECTORY ${TOOLS_DIR}/train/)

endif()
4 changes: 1 addition & 3 deletions src/_srl/Sentence.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,15 +86,13 @@ void Sentence::from_corpus_block(
children_of_node[parent].push_back(row);
}

/*
if (m_predicates.size() != m_argument_columns.size())
{
m_argument_columns.resize(m_predicates.size()); //proinsight
// cout<<m_fields[1][FIELD_FORM]<<endl;
}
*/

assert(m_predicates.size() == m_argument_columns.size());
// assert(m_predicates.size() == m_argument_columns.size());

// build parse_tree
SRLTree::iterator node_iter;
Expand Down
2 changes: 1 addition & 1 deletion src/ner/nerio.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class NERReader {
}

std::vector<std::string> words = split(line);
unsigned found;
int found;

for (int i = 0; i < words.size(); ++ i) {
if (train) {
Expand Down
217 changes: 0 additions & 217 deletions tools/train/assets/bushou.txt

This file was deleted.

14 changes: 0 additions & 14 deletions tools/train/assets/crfpp.template

This file was deleted.

Loading

0 comments on commit 36d3935

Please sign in to comment.