Skip to content

Commit

Permalink
Merge pull request #55 from duydq12/dev/RB-327_build_pn9_on_win10
Browse files Browse the repository at this point in the history
 refs RB-327: PN9 integration for Windows environment
  • Loading branch information
guillaumekln committed Jan 10, 2023
2 parents 3b2f288 + b815402 commit f4c1d7f
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion cli/src/FuzzyMatch-cli.cc
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ int main(int argc, char** argv)
"`sep`/`jnr` and/or `pct`.")
("idf-penalty,I", po::value(&idf_penalty)->default_value(0), "if not 0, apply idf-penalty on missing tokens")
("subseq-idf-weighting,w", po::bool_switch(), "use idf weighting in finding longest subsequence")
("max-tokens-in-pattern", po::value(&max_tokens_in_pattern)->default_value(fuzzy::SuffixArrayIndex::DEFAULT_MAX_TOKENS_IN_PATTERN), "Patterns containing more tokens than this value are ignored")
("max-tokens-in-pattern", po::value(&max_tokens_in_pattern)->default_value(fuzzy::DEFAULT_MAX_TOKENS_IN_PATTERN), "Patterns containing more tokens than this value are ignored")
("nthreads,N", po::value(&nthreads)->default_value(4), "number of thread to use for match")
;

Expand Down
2 changes: 1 addition & 1 deletion include/fuzzy/fuzzy_match.hh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ namespace fuzzy
};

FuzzyMatch(int pt = penalty_token::pt_none,
size_t max_tokens_in_pattern = SuffixArrayIndex::DEFAULT_MAX_TOKENS_IN_PATTERN);
size_t max_tokens_in_pattern = DEFAULT_MAX_TOKENS_IN_PATTERN);
~FuzzyMatch();

bool add_tm(const std::string& id, const Tokens& norm, bool sort = true);
Expand Down
4 changes: 2 additions & 2 deletions include/fuzzy/suffix_array_index.hh
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@

namespace fuzzy
{
constexpr size_t DEFAULT_MAX_TOKENS_IN_PATTERN = 300; // if you change this value, update README.md

class SuffixArrayIndex
{
public:
static const size_t DEFAULT_MAX_TOKENS_IN_PATTERN;

SuffixArrayIndex(size_t max_tokens_in_pattern = DEFAULT_MAX_TOKENS_IN_PATTERN);

const SuffixArray &get_SuffixArray() const;
Expand Down
4 changes: 3 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ set(FUZZY_SOURCES
edit_distance.cc
pattern_coverage.cc
)

if(MSVC)
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
endif()
if (COMMAND create_library)
create_library(${PROJECT_NAME} SHARED
${FUZZY_SOURCES})
Expand Down
2 changes: 0 additions & 2 deletions src/suffix_array_index.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

namespace fuzzy
{
const size_t SuffixArrayIndex::DEFAULT_MAX_TOKENS_IN_PATTERN = 300; // if you change this value, update README.md

SuffixArrayIndex::SuffixArrayIndex(size_t max_tokens_in_pattern)
: _max_tokens_in_pattern(max_tokens_in_pattern)
{
Expand Down

0 comments on commit f4c1d7f

Please sign in to comment.