Skip to content
Discussion options

You must be logged in to vote

If you have fine-grained tags saved as token.tag that could potentially map to other features like token.morph, you can add rules that do this mapping in an attribute_ruler component. If you want to see an example, we do this in several trained pipelines like en_core_web_sm. We don't have this stored anywhere in a better format, but you can check out nlp.get_pipe("attribute_ruler").patterns to see the raw patterns. An example of one pattern is:

  {
    "patterns":[
      [
        {
          "TAG":"-LRB-"
        }
      ]
    ],
    "attrs":{
      "POS":"PUNCT",
      "MORPH":"PunctSide=Ini|PunctType=Brck"
    },
    "index":0
  }

If you have the mapping in the spacy v2 tag map or mor…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@k-sap
Comment options

@polm
Comment options

Answer selected by svlandeg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat / morphology Feature: Morphology and MorphAnalysis
3 participants
Converted from issue

This discussion was converted from issue #9646 on November 09, 2021 11:48.