References
¶
Resolving references in imported data to Factor
s and text passages.
Retrieve cached
Factor
instead of building one with the decorated method.Decorator for
read_factor()
andread_enactment()
.If factor_record is a
str
instead of adict
, looks up the corresponding factor in “mentioned” and returns that instead of constructing a newFactor
. Also, if the newly-constructedFactor
has aname
attribute, logs theFactor
inmentioned
for later use.
Break up shorthand text selector format into three fields.
Tries to break up the string into
prefix
,exact
, andsuffix
, by splitting on the pipe characters.
Create new selector from JSON user input.
Create list of
TextQuoteSelector
s from JSON user input.If the input is a
str
, tries to break up the string intoprefix
,exact
, andsuffix
, by splitting on the pipe characters.- Parameters
record – a string or dict representing a text passage, or list of strings and dicts.
- Return type
- Returns
a list of
TextQuoteSelector
s