API documentation
Constructing and accessing basic structures
The LexiconArticle
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.
SimpleLexica.LexiconArticle
— TypeA simple lexicon article.
SimpleLexica.lemma
— FunctionLemma or heading for a LexiconArticle
.
lemma(lexart)
SimpleLexica.article
— FunctionBody of article for a LexiconArticle
.
article(lexart)
The Lexicon
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.Lexicon
— TypeA lexicon comprising a list of simple LexiconArticle
s.
SimpleLexica.lexicon
— FunctionExtract a Lexicon
from a local file with one of Christopher Blackwell's libraries in CEX format.
lexicon(f; delimiter)
Construct a Lexicon
from a list of delimited-text lines.
lexicon(linelist; delimiter)
SimpleLexica.lewis_short
— FunctionConstruct Lewis-Short by downloading CEX from Christopher Blackwell's github repository.
lewis_short()
SimpleLexica.lsj
— FunctionConstruct LSJ lexicon by downloading CEX from Christopher Blackwell's github repository.
lsj()
SimpleLexica.urns
— FunctionExtract URNs from a lexicon.
urns(lex)
SimpleLexica.lemmata
— FunctionExtract lemmata from a lexicon.
lemmata(lex)
SimpleLexica.articles
— FunctionExtract articles from a lexicon.
articles(lex)
Using a lexicon
SimpleLexica.lookup
— FunctionLookup 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)
SimpleLexica.search
— FunctionSearch lexicon lex
for string s
.
search(lex, s; searchscope, simplified, case_sensitive)
Optional parameters:
searchscope
: one ofSearchScope.LEMMA
,SearchScope.ARTICLE
, orSearchScope.ALL
. Default:SearchScope.ALL
.simplified
: aLexicon
formatted for searching. Default:nothing
.case_sensitive
:true
if case should be taken into account in matching. Default:true
.
SimpleLexica.simplify
— FunctionSimplify 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)
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)