# Changelog
Changelog of project Nuspell.

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [5.1.2] - 2022-09-29
### Changed
- Rewrite internal testing tool verify and improve it to support testing
  suggestions.

### Fixed
- Greatly improve the speed of suggestions in certain edge cases. See #45.
- Fix minor encoding issue in the CLI tool on Windows when reading from file(s)
  instead of the standard input. UTF-8 is now the default encoding in that case
  and not the one of the console.

## [5.1.1] - 2022-09-09
### Added
- Add configuration option `BUILD_TOOLS` that can be used to disable building
  the CLI tool. It is ON by default. See #122.

### Changed
- Made error reporting more detailed and robust. The message in the thrown
  exception is much richer when there are parsing errors. The library does
  not write directly to `cerr`, it does not pollute it. See #123.

### Fixed
- Fix compiler warnings regarding usage of deprecated functions.
- Fix CLI tool on Windows + MSVC to properly accept arguments. Windows + MSVC
  now requires library `getopt` from Vcpkg. Fixes #122.

## [5.1.0] - 2022-02-15
### Added
- Add new API for finding dictionaries on the filesystem that uses facilities
  from C++17 `std::filesystem`.

### Changed
- Simplify CLI tool and removed some unused features from it.

### Deprecated
- Deprecate old API for finding dictionaries on the filesystem that used
  strings for paths.

### Removed
- Remove man-page for CLI tool and dependency on pandoc. Just use --help to get
  manual for the CLI tool.

## [5.0.1] - 2021-11-12
### Fixed
- Fix parsing of .dic files for some problematic dictionaries. Fixes #99.

### Changed
- Simplify internal calls to `icu::UnicodeString::toTitle()` which results with
  a minor speedup. This enables Nuspell to be linked to unconventional ICU
  builds without break iterator, like the one in Firefox.
- Require GCC 8 as minimal version of GCC because internally `std::from_chars()`
  is used now.

## [5.0.0] - 2021-06-12
### Fixed
- Greatly reduce memory usage. See issues #80 and #97.
- Increase speed of spellchecking.
- Fix long lagging when generating suggestions in edge cases. See #45.
- Fix building on OS Haiku. Fixes #44.

### Changed
- Split file `dictionary.hxx/cxx` into multiple files. The other files are
  implementation details and the public header `dictionary.hxx` is now clean of
  private details.

### Removed
- Remove functions and classes that were deprecated in v4.x. See issue #103.

## [4.2.0] - 2020-12-12
### Deprecated
- Deprecate functions that allowed non-Unicode encoding. In particular,
  `Dictionary::imbue()` and `Dictionary::imbue_utf8()`.

### Removed
- Completely remove dependency on Boost. The CLI tools were refactored to use
  ICU directly.

## [4.1.0] - 2020-11-19
### Added
- Add new API for finding dictionaries on the file-system. It is a set of free
  functions located in the file finder.hxx.

### Fixed
- Improve searching for dictionaries on the file-system. Fix finding them on
  Fedora. Fixes #94.

### Deprecated
- Deprecate the old API for finding dictionaries, i.e. the class `Finder`
  in the file finder.hxx.

## [4.0.1] - 2020-11-02
### Fixed
- Fix handling CRLF line endings in .dic. Fixes #89.
- Fix CMake scripts for unusual install prefixes.
- Improve hash-table insertion, avoid temporaries. This improves loading times.

### Changed
- Switch man-page generator from Ronn to Pandoc. This changes the dependencies
  for building. See the README.

## [4.0.0] - 2020-10-19
### Fixed
- Fix lifetime issue (segmentation fault) in ngram-based suggestions. Fixes #84.
- Fix internal usage of `std::codecvt` in edge case in function `to_wide()` and
  `to_narrow()`
- Fix not propagating recursion depth in spell_break(), which caused hangup.
  Fixes #85.
- Fix overwriting of PDB files when compiling with Visual Studio. This prevented
  debugging nuspell.dll. Fixes #86.
- Fix output of CLI tool to be more compatible to ispell and hunspell.

### Changed
- Boost is no longer a dependency of the library at all. It is still a
  dependency of the CLI tool. Closes #79. Fixes #71.
- Use `std::string_view` in the public API instead of `const std::string&`. Also
  use it internally at various places.
- Build as shared library by default. Building as static is still possible via
  the CMake's variable `BUILD_SHARED_LIBS`.
- The public API is annotated with dll-export/visibility attributes, and also
  some private functions are annotated needed for testing. This reduces the file
  size. Closes #65.
- Use Unicode text segmentation by default in the CLI tool. Simple segmentation
  on white-space is still available via CLI option.

### Removed
- Delete deprecated functions in the class Finder.
- Drop under-designed and undocumented feature in the CLI tool about personal
  dictionaries.

## [3.1.2] - 2020-07-01
### Fixed
- Internal refactorings that reduce function templates in `utils` and `finder`.

### Changed
- File `utils.hxx` is not installed any more. It is a private header.

### Deprecated
- Some functions for searching dictionaries in class `Finder` are deprecated as
  they were searching in directories that no longer contain dictionaries.

## [3.1.1] - 2020-05-04
### Changed
- Updated description in README. Packagers are encouraged to update it in their
  packages.
- Moved Hunspell files from the directory "src" into the directory named
  "external" to clarify that it is third-party dependency. Previously, some
  packagers confused Hunspell's license notices as part of Nuspell. Hunspell is
  used only for testing and it is not part of the main program.

### Fixed
- Fixed bugs on FreeBSD and other BSDs related to encoding conversions. Now
  all tests pass on FreeBSD and the support for it is not experimental anymore.
- Fixed compiling on NetBSD.

## [3.1.0] - 2020-04-07
### Added
- Add so called hidden homonym feature. This feature enables words in mixed case
  in the dictionary to be accepted when met in uppercase in the input text. Also
  enables uppercase word to get lowercase suffix, and the whole derived word be
  accepted in all uppercase in some input text.
- Improve suggestions to handle words in various casing.
- Add new complex method for giving suggestions based on ngram similarity of the
  wrong word with the words in the dictionary.

## [3.0.0] - 2019-11-23
### Added
- Added compounding features: CHECKCOMPOUNDREP, FORCEUCASE, COMPOUNDWORDMAX.
- Added compounding features specific only to Hungarian language:
  COMPOUNDROOT, COMPOUNDSYLLABLE, SYLLABLENUM. These three basically are
  extension to COMPOUNDWORDMAX.
- Added six new simple suggestion methods.

### Changed
- Building and using the library requires a compiler with C++17 support.
- The functions of the public API now accept strings encoded in UTF-8 by
  default. You should not call the function `imbue()` and you should not use
  `locale` and `codecvt` objects at all if you need UTF-8 strings. Use `imbue()`
  only if you need API that accepts strings in other encoding.

### Fixed
- Major improvement in speed. The best case is almost 3x faster than Hunspell,
  and the worst case is now matching and exceeding Hunspell's speed by a
  few percent. Previously, the worst case was usually triggered with incorrect
  words and was major bottleneck, it was slower than Hunspell.
- Fixed loading Dutch dictionary, a regression introduced in 2.3.0.

## [2.3.0] - 2019-08-08
### Added
- Support for macOS
- Support for building with MSVC on Windows
- Support for building with pre-installed Catch 2
- Continuous integration/testing for all three major operating systems
- In the CLI tool, Unicode text segmentation now can be combined with all modes.

### Changed
- In Cmake the exported target has namespace, e.g. Nuspell::nuspell

### Fixed
- Building from a tarball. Previously only a git clone worked.
- Small internal fixes in Unicode transformations on Windows (because wchar_t
  is 16 bits there).
- Major improvements in aff parser brings better error handling.

## [2.2.0] - 2019-03-19
### Added
- Added build System CMake. Supports building as shared library.

### Changed
- Public API changed again, last for v2:
    - `Dictionary::suggest()` return data inside simple `vector<string>`.
      `List_Strings` is not used anymore.
    - Constructors of class `Dictionary` like `Dictionary::load_from_path()`
      throw `Dictionary_Loading_Error` on error. Previously they were throwing
      `ios_base::failure`.
- Boost::Locale is not dependency of library Nuspell anymore. It is still a
  dependency of the CLI tool. The library depends directly on ICU. Internally,
  all string now are in Unicode (UTF-8 or UTF-32, it depends of the need).

### Removed
- Removed old Autotools build system.
- Removed `NOSUGGEST_MODE` in CLI tool. It was very similar to
  `MISSPELLED_WORDS_MODE`.
- Class `Finder` does not search for Myspell dictionaries on the file-system
  anymore.

### Fixed
- Support compiling with GCC 5. Previously GCC 7 was needed.
- Faster dictionary loading and better internal error handling when parsing a
  dictionary file.
- Faster spellchecking as a consequence of faster case classification, which
  in turn, is a consequence of all string being Unicode and directly using ICU.

## [2.1.0] - 2019-01-03
### Changed
- Public API classes are inside inline namespace v2
- `List_Strings<char>` is renamed to just `List_Strings`. Affects client code.

### Fixed
- Improve public API docs

## [2.0.0] - 2018-11-22
### Added
- First public release
- Spelling error detection (checking) is closely matching Hunspell
- Support for spelling error correction (suggestions)

[Unreleased]: https://github.com/nuspell/nuspell/compare/v5.1.2...HEAD
[5.1.2]: https://github.com/nuspell/nuspell/compare/v5.1.1...v5.1.2
[5.1.1]: https://github.com/nuspell/nuspell/compare/v5.1.0...v5.1.1
[5.1.0]: https://github.com/nuspell/nuspell/compare/v5.0.1...v5.1.0
[5.0.1]: https://github.com/nuspell/nuspell/compare/v5.0.0...v5.0.1
[5.0.0]: https://github.com/nuspell/nuspell/compare/v4.2.0...v5.0.0
[4.2.0]: https://github.com/nuspell/nuspell/compare/v4.1.0...v4.2.0
[4.1.0]: https://github.com/nuspell/nuspell/compare/v4.0.1...v4.1.0
[4.0.1]: https://github.com/nuspell/nuspell/compare/v4.0.0...v4.0.1
[4.0.0]: https://github.com/nuspell/nuspell/compare/v3.1.2...v4.0.0
[3.1.2]: https://github.com/nuspell/nuspell/compare/v3.1.1...v3.1.2
[3.1.1]: https://github.com/nuspell/nuspell/compare/v3.1.0...v3.1.1
[3.1.0]: https://github.com/nuspell/nuspell/compare/v3.0.0...v3.1.0
[3.0.0]: https://github.com/nuspell/nuspell/compare/v2.3.0...v3.0.0
[2.3.0]: https://github.com/nuspell/nuspell/compare/v2.2.0...v2.3.0
[2.2.0]: https://github.com/nuspell/nuspell/compare/v2.1.0...v2.2.0
[2.1.0]: https://github.com/nuspell/nuspell/compare/v2.0.0...v2.1.0
[2.0.0]: https://github.com/nuspell/nuspell/compare/v1.6.2...v2.0.0
