Example #1
0
 def ja(self, lang, key="availableTexts"):
     """
     :param lang: "he", "en", or "all"
     :param addr:
     :return:
     """
     return JaggedIntArray(self.var(lang, key))
Example #2
0
    def _node_count(self, snode, lang="en"):
        """
        Count available versions of a text in the db, segment by segment.
        :return counts:
        :type return: JaggedIntArray
        """
        counts = JaggedIntArray()

        versions = self.versions(lang)
        for version in versions:
            raw_text_ja = version.content_node(snode)
            ja = JaggedTextArray(raw_text_ja)
            mask = ja.mask()
            counts = counts + mask

        return counts