API documentation

Constructing and accessing basic structures

The LexiconArticle

A citable object

The LexiconArticle is a citable object and therefore also implements the functions for URN citation, URN comparison, and delimited-text serialization from the CitableBase package.

The Lexicon

A citable collection

The Lexicon is a citable collection and therefore also implements the functions for URN filtering and delimited-text serialization from the CitableBase package, in addition to iteration from Julia base and tabular behavior from Tables.jl.

SimpleLexica.lexiconFunction

Extract a Lexicon from a local file with one of Christopher Blackwell's libraries in CEX format.

lexicon(f; delimiter)
source

Construct a Lexicon from a list of delimited-text lines.

lexicon(linelist; delimiter)
source
SimpleLexica.lsjFunction

Construct LSJ lexicon by downloading CEX from Christopher Blackwell's github repository.

lsj()
source

Using a lexicon

SimpleLexica.lookupFunction

Lookup article by Cite2Urn using URN containment. The URN should uniquely identify an article in this lexicon. If it does not, the function returns nothing.

lookup(u, lexicon)
source
SimpleLexica.searchFunction

Search lexicon lex for string s.

search(lex, s; searchscope, simplified, case_sensitive)

Optional parameters:

  • searchscope: one of SearchScope.LEMMA, SearchScope.ARTICLE, or SearchScope.ALL. Default: SearchScope.ALL.
  • simplified: a Lexicon formatted for searching. Default: nothing.
  • case_sensitive: true if case should be taken into account in matching. Default: true.
source
SimpleLexica.simplifyFunction

Simplify a string for searching. Removes all non-alphabetic characters, and strips diacritics. If case_sensitive is false, makes all text lower case.

simplify(s; case_sensitive)
source

Simplify the lemmata and article bodies of lexicon entries for searching. Removes all non-alphabetic characters, and strips diacritics. If case_sensitive is false, makes all text lower case.

simplify(lex; case_sensitive)
source