Instantiate a parser
using CitableParserBuilder
= CitableParserBuilder.gettysburgParser() parser
Package version: 0.30.1
June 7, 2024
You can also parse citable text structures: passages, documents and corpora. Here we illustrate parsing a citable passage.
First, create a GettysburgParser
and assign it to a variable named parser
.
using CitableText, CitableCorpus
psgurn = CtsUrn("urn:cts:demo:gburg.hays.v2:1.2")
psg = CitablePassage(psgurn, "score")
psg_analysis = parsepassage(psg, parser; data = parser.data)
typeof(psg_analysis)
AnalyzedToken
The result is a new kind of object, the AnalyzedToken
, which associates a Vector of Analysis
objects with a citable passage.
What’s this?
psg_analysis.analyses == scoreparses