nlp

This library is a small set of algorithms and data processing utilities for Natural Languages.

Much of this code is from the Nyxt analysis library here.

1. Fuzzy

The nlp/fuzzy package contains a fuzzy matching algorithm extracted from Nyxt.

(describe 'nlp/fuzzy:fuzzy-match)
NLP/FUZZY:FUZZY-MATCH
  [symbol]

FUZZY-MATCH names a compiled function:
  Lambda-list: (INPUT SUGGESTIONS &KEY SUGGESTIONS-DISPLAY
                (SCORE-SUGGESTION (QUOTE SCORE-SUGGESTION)))
  Derived type: (FUNCTION
                 (T T &KEY (:SUGGESTIONS-DISPLAY T)
                  (:SCORE-SUGGESTION T))
                 (VALUES T &OPTIONAL))
  Documentation:
    From the user input and a list of suggestions, return a filtered list of
    suggestions that have all the input words in them, and sort this list to have the
    'most relevant' first.
    The match is case-sensitive if INPUT contains at least one uppercase character.
    SUGGESTIONS-DISPLAY can be used to pass the pre-computed display strings of the
    suggestions; otherwise `object-display' is used.
  Source file: /home/ellis/comp/core/lib/nlp/fuzzy.lisp