matra 0.3.0

NLP library: UDPipe structured parse, base text metrics, summarization, keyphrase extraction. Rust core with Python bindings.
Documentation
{
  "name": "markdown-structure",
  "description": "A markdown document with every construct the reader recognises or skips: front matter, headings (a `## References` heading included, which once ended the document), inline markup the parser must not read, a block quote (never parsed), a list item, and a table. Pins the section tree, every paragraph's kind and span, what was skipped and where, and every sentence and token span, all in UTF-8 bytes of the input.",
  "input": "---\ntitle: Field notes\n---\n\n# Field notes\n\nThe river **rose** overnight.\n\n> The water was cold.\n\n- Bring `boots` tomorrow.\n\n| day | level |\n|-----|-------|\n| 1   | 2     |\n\n## References\n\nSmith wrote the guide.\n",
  "format": "markdown",
  "expect": {
    "metrics": {
      "total_sentences": 3,
      "total_words": 11,
      "paragraph_count": 4,
      "vocabulary_ttr": 0.909091,
      "nominalization_ratio": 0.0,
      "passive_ratio": 0.0
    },
    "sections": [
      {
        "heading": "Field notes",
        "level": 1,
        "span": {
          "byte_start": 28,
          "byte_end": 41
        }
      },
      {
        "heading": "References",
        "level": 2,
        "span": {
          "byte_start": 173,
          "byte_end": 186
        }
      }
    ],
    "paragraphs": [
      {
        "kind": "paragraph",
        "span": {
          "byte_start": 43,
          "byte_end": 72
        }
      },
      {
        "kind": "quote",
        "span": {
          "byte_start": 74,
          "byte_end": 95
        }
      },
      {
        "kind": "list_item",
        "span": {
          "byte_start": 97,
          "byte_end": 122
        }
      },
      {
        "kind": "paragraph",
        "span": {
          "byte_start": 188,
          "byte_end": 210
        }
      }
    ],
    "skipped": [
      {
        "kind": "front_matter",
        "span": {
          "byte_start": 0,
          "byte_end": 26
        }
      },
      {
        "kind": "table",
        "span": {
          "byte_start": 124,
          "byte_end": 171
        }
      }
    ],
    "sentences": [
      {
        "span": {
          "byte_start": 43,
          "byte_end": 72
        },
        "text": "The river rose overnight.",
        "token_count": 5,
        "tokens": [
          {
            "id": 1,
            "span": {
              "byte_start": 43,
              "byte_end": 46
            },
            "text": "The",
            "lemma": "the",
            "pos": "DET",
            "head": 2,
            "dep": "det"
          },
          {
            "id": 2,
            "span": {
              "byte_start": 47,
              "byte_end": 52
            },
            "text": "river",
            "lemma": "river",
            "pos": "NOUN",
            "head": 3,
            "dep": "nsubj"
          },
          {
            "id": 3,
            "span": {
              "byte_start": 55,
              "byte_end": 59
            },
            "text": "rose",
            "lemma": "rise",
            "pos": "VERB",
            "head": 0,
            "dep": "root"
          },
          {
            "id": 4,
            "span": {
              "byte_start": 62,
              "byte_end": 71
            },
            "text": "overnight",
            "lemma": "overnight",
            "pos": "ADV",
            "head": 3,
            "dep": "advmod"
          },
          {
            "id": 5,
            "span": {
              "byte_start": 71,
              "byte_end": 72
            },
            "text": ".",
            "lemma": ".",
            "pos": "PUNCT",
            "head": 3,
            "dep": "punct"
          }
        ]
      },
      {
        "span": {
          "byte_start": 99,
          "byte_end": 122
        },
        "text": "Bring boots tomorrow.",
        "token_count": 4,
        "tokens": [
          {
            "id": 1,
            "span": {
              "byte_start": 99,
              "byte_end": 104
            },
            "text": "Bring",
            "lemma": "bring",
            "pos": "VERB",
            "head": 0,
            "dep": "root"
          },
          {
            "id": 2,
            "span": {
              "byte_start": 106,
              "byte_end": 111
            },
            "text": "boots",
            "lemma": "boot",
            "pos": "NOUN",
            "head": 1,
            "dep": "obj"
          },
          {
            "id": 3,
            "span": {
              "byte_start": 113,
              "byte_end": 121
            },
            "text": "tomorrow",
            "lemma": "tomorrow",
            "pos": "NOUN",
            "head": 1,
            "dep": "obl:tmod"
          },
          {
            "id": 4,
            "span": {
              "byte_start": 121,
              "byte_end": 122
            },
            "text": ".",
            "lemma": ".",
            "pos": "PUNCT",
            "head": 1,
            "dep": "punct"
          }
        ]
      },
      {
        "span": {
          "byte_start": 188,
          "byte_end": 210
        },
        "text": "Smith wrote the guide.",
        "token_count": 5,
        "tokens": [
          {
            "id": 1,
            "span": {
              "byte_start": 188,
              "byte_end": 193
            },
            "text": "Smith",
            "lemma": "Smith",
            "pos": "PROPN",
            "head": 2,
            "dep": "nsubj"
          },
          {
            "id": 2,
            "span": {
              "byte_start": 194,
              "byte_end": 199
            },
            "text": "wrote",
            "lemma": "write",
            "pos": "VERB",
            "head": 0,
            "dep": "root"
          },
          {
            "id": 3,
            "span": {
              "byte_start": 200,
              "byte_end": 203
            },
            "text": "the",
            "lemma": "the",
            "pos": "DET",
            "head": 4,
            "dep": "det"
          },
          {
            "id": 4,
            "span": {
              "byte_start": 204,
              "byte_end": 209
            },
            "text": "guide",
            "lemma": "guide",
            "pos": "NOUN",
            "head": 2,
            "dep": "obj"
          },
          {
            "id": 5,
            "span": {
              "byte_start": 209,
              "byte_end": 210
            },
            "text": ".",
            "lemma": ".",
            "pos": "PUNCT",
            "head": 2,
            "dep": "punct"
          }
        ]
      }
    ]
  }
}