The following properties do not contain any new data instead, they provide useful ways to access the data we have already discussed.įlattens the scan data into a single array. Returns the meter the line was scanned with.Īn array of outputObjects. NB that error information is also passed back in the error property of objects in the " output" property. This is most obviously useful when the status is Warning, as it is sometimes used to pass back data about why the line is failing to scan. This indicates weather the algoithm was able to produce a single scan (OK) multiple scans (Plus) or no scan (Warning).Īdditional information pertaining to the status of the scan. Takes on a value of either "Warning", "OK" or "Plus". There are 5 data properties on this object, and 3 further properties which can help access the data. ![]() ![]() The results for the scanner functions are returned with an interfaced called scannedLineObject. The defaultSettings export is an instantiation of this interface, configured to handle Hexameter poetry. When this is true, the meter declared in the meter property will be used for the first "line", and it will cycle back and forth for each consecutive non-null line. The elegaic property has no effect on the scanLine function. The meter (a string with the value of "Hexameter" or "Pentameter") of the content to be scanned.Ī boolean that denotes weather the paragraph should be scanned in Elegaic Įlegaic poetry is multi-line by nature and therefore it is ony supported within the scanParagraph function. The scanSettings object is how settings are passed to the analyser functions, and it is the same for both functions described above. It returns the results as an array of scannedLine objects. ScanParagraph(settings, paragraph) will break its string input on lineBreaks ("\n") and pass each line into the scanLine function. It returns a scannedLine object which contains the solutions found as well as meta data about the scan. ![]() ScanLine(settings, line) will assume that its string input is a line of poetry. Both of these accept a settings object and a string as arguments. One of these is the replaceForcedQuantities function, which takes in a string as an input and will replace _ with a spondee and with a dactyl. There are three user-facing functions in the latin-scanner libarary. This API provides all of its functionality via named exports.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |