How to use the justext.paragraph.Paragraph function in jusText

To help you get started, we’ve selected a few jusText examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github miso-belica / jusText / tests / test_classify_paragraphs.py View on Github external
def _paragraph(self, **kwargs):
        path = PathInfo().append("body").append("p")
        paragraph = Paragraph(path)

        for n, v in kwargs.items():
            if n == "text":
                paragraph.append_text(v)
            else:
                setattr(paragraph, n, v)

        return paragraph
github miso-belica / jusText / justext / core.py View on Github external
def _start_new_pragraph(self):
        if self.paragraph and self.paragraph.contains_text():
            self.paragraphs.append(self.paragraph)

        self.paragraph = Paragraph(self.path)