Skip to content

Commit

Permalink
Improves word pair suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
aarondandy committed Aug 17, 2018
1 parent ea97978 commit f67b1fd
Show file tree
Hide file tree
Showing 6 changed files with 166 additions and 105 deletions.
2 changes: 1 addition & 1 deletion contributing.md
Expand Up @@ -7,7 +7,7 @@
1. ✍ Before doing any work, make sure to open or claim an [issue](https://github.com/aarondandy/WeCantSpell.Hunspell/issues) and get some discussion started.
2. 📦 Fork and clone the repository [with submodules](https://git-scm.com/book/en/v2/Git-Tools-Submodules) (example: `git clone --recursive https://github.com/aarondandy/WeCantSpell.Hunspell.git`).
3. 🛠 Open the main WeCantSpell.Hunspell.sln solution file in your IDE.
4. 👌 Build the solution and run the XxUnit.net tests using your runner of choice (NCrunch3 is configured).
4. 👌 Build the solution and run the xUnit.net tests using your runner of choice (NCrunch3 is configured).

## Style 🎩

Expand Down
1 change: 1 addition & 0 deletions src/WeCantSpell.Hunspell/AffixConfig.Builder.cs
Expand Up @@ -388,6 +388,7 @@ private AffixConfig ToImmutable(bool destructive)
Culture = culture,
IsHungarian = string.Equals(culture?.TwoLetterISOLanguageName, "HU", StringComparison.OrdinalIgnoreCase),
IsGerman = string.Equals(culture?.TwoLetterISOLanguageName, "DE", StringComparison.OrdinalIgnoreCase),
IsLanguageWithDashUsage = !string.IsNullOrEmpty(TryString) && TryString.ContainsAny('-', 'a'),
CultureUsesDottedI =
string.Equals(culture?.TwoLetterISOLanguageName, "AZ", StringComparison.OrdinalIgnoreCase)
|| string.Equals(culture?.TwoLetterISOLanguageName, "TR", StringComparison.OrdinalIgnoreCase)
Expand Down
8 changes: 8 additions & 0 deletions src/WeCantSpell.Hunspell/AffixConfig.cs
Expand Up @@ -828,6 +828,14 @@ public bool IsAliasM

public bool IsGerman { get; private set; }

/// <summary>
/// Language with possible dash usage.
/// </summary>
/// <remarks>
/// Latin letters or dash in TRY characters can trigger this condition.
/// </remarks>
public bool IsLanguageWithDashUsage { get; private set; }

public bool CultureUsesDottedI { get; private set; }

public WarningList Warnings { get; private set; }
Expand Down
2 changes: 2 additions & 0 deletions src/WeCantSpell.Hunspell/WordList.Query.cs
Expand Up @@ -26,6 +26,8 @@ protected Query(string word, WordList wordList)

protected const int MaxWordUtf8Len = MaxWordLen * 3;

protected const int MaxCompoundSuggestions = 3;

protected const int MaxSuggestions = 15;

protected const int MaxRoots = 100;
Expand Down

0 comments on commit f67b1fd

Please sign in to comment.