diff options
Diffstat (limited to 'libs/hunspell/src/suggestmgr.hxx')
-rw-r--r-- | libs/hunspell/src/suggestmgr.hxx | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/libs/hunspell/src/suggestmgr.hxx b/libs/hunspell/src/suggestmgr.hxx index 19ffc03a84..4c2fb69032 100644 --- a/libs/hunspell/src/suggestmgr.hxx +++ b/libs/hunspell/src/suggestmgr.hxx @@ -1,7 +1,7 @@ /* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * - * Copyright (C) 2002-2017 Németh László + * Copyright (C) 2002-2022 Németh László * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with @@ -78,11 +78,6 @@ #define MAXPHONSUGS 2 #define MAXCOMPOUNDSUGS 3 -// timelimit: max ~1/4 sec (process time on Linux) for a time consuming function -#define TIMELIMIT (CLOCKS_PER_SEC >> 2) -#define MINTIMER 100 -#define MAXPLUSTIMER 100 - #define NGRAM_LONGER_WORSE (1 << 0) #define NGRAM_ANY_MISMATCH (1 << 1) #define NGRAM_LOWERING (1 << 2) @@ -92,7 +87,6 @@ #include "affixmgr.hxx" #include "hashmgr.hxx" #include "langnum.hxx" -#include <time.h> enum { LCS_UP, LCS_LEFT, LCS_UPLEFT }; @@ -109,6 +103,7 @@ class SuggestMgr { char* ctry; size_t ctryl; std::vector<w_char> ctry_utf; + bool lang_with_dash_usage; AffixMgr* pAMgr; unsigned int maxSug; @@ -124,8 +119,8 @@ class SuggestMgr { SuggestMgr(const char* tryme, unsigned int maxn, AffixMgr* aptr); ~SuggestMgr(); - void suggest(std::vector<std::string>& slst, const char* word, int* onlycmpdsug); - void ngsuggest(std::vector<std::string>& slst, const char* word, const std::vector<HashMgr*>& rHMgr); + bool suggest(std::vector<std::string>& slst, const char* word, int* onlycmpdsug); + void ngsuggest(std::vector<std::string>& slst, const char* word, const std::vector<HashMgr*>& rHMgr, int captype); std::string suggest_morph(const std::string& word); std::string suggest_gen(const std::vector<std::string>& pl, const std::string& pattern); @@ -149,7 +144,7 @@ class SuggestMgr { int extrachar(std::vector<std::string>&, const char*, int); int badcharkey(std::vector<std::string>&, const char*, int); int badchar(std::vector<std::string>&, const char*, int); - int twowords(std::vector<std::string>&, const char*, int); + bool twowords(std::vector<std::string>&, const char*, int, bool); void capchars_utf(std::vector<std::string>&, const w_char*, int wl, int); int doubletwochars_utf(std::vector<std::string>&, const w_char*, int wl, int); |