You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We need to make it possible to export the teiHeader at .getTextualNode(). We'll also need an option somewhere in the Retriever but first we need that at the getTextualNode() level.
I was wondering if @brosner or @jtauber had thoughts about this question and how they'd see the function get expanded from where it is now.
My feeling is include_header is too TEI specific, but the metadata argument is already taken in the resolver declaration (and though would have a different meaning in between classes type which would be bad design I think). Any idea ?
defgetTextualNode(self, textId, subreference=None, prevnext=False, metadata=False):
""" Retrieve a text node from the API :param textId: CtsTextMetadata Identifier :type textId: str :param subreference: CapitainsCtsPassage Reference :type subreference: str :param prevnext: Retrieve graph representing previous and next passage :type prevnext: boolean :param metadata: Retrieve metadata about the passage and the text :type metadata: boolean :return: CapitainsCtsPassage :rtype: CapitainsCtsPassage """raiseNotImplementedError()
The text was updated successfully, but these errors were encountered:
I am not sure I understand how the TEI header relates to the textual node offered by MyCapytain. While I get that it exists in the TEI and the textual node is coming from it, I think it needs its own dedicated method.
For example, including the header within any other value for the other parameters seems confusing to me. Surely a caller would only need the header once and not optionally for each getTextualNode invocation. Wrong level of abstraction IMO.
The teiHeader and other nodes sometimes (like Front and Back) might hold information necessary to understand and read information in the textual node (for example glossaries). This is extremely common in critical edition (which Perseus does not have at the moment).
I like the idea of it having it's own function (ie Passage.add(SomeXpath)) but I need to see the implication of such a choice outside of the resolver (for local files without resolver, I do not remember if texts are tied with their passage)
Note : This is coming as a requirement of DTS as well
We need to make it possible to export the teiHeader at
.getTextualNode()
. We'll also need an option somewhere in the Retriever but first we need that at thegetTextualNode()
level.I was wondering if @brosner or @jtauber had thoughts about this question and how they'd see the function get expanded from where it is now.
My feeling is
include_header
is too TEI specific, but themetadata
argument is already taken in the resolver declaration (and though would have a different meaning in between classes type which would be bad design I think). Any idea ?Current implementation
Text Class
For reference : https://github.com/Capitains/MyCapytain/blob/master/MyCapytain/resources/texts/local/capitains/cts.py#L46-L100
Function declaration :
Resolver
https://github.com/Capitains/MyCapytain/blob/master/MyCapytain/resolvers/prototypes.py#L28-L42
The text was updated successfully, but these errors were encountered: