8000 Provide a way to define labels with regular expression replacement patterns · Issue #476 · INCATools/dosdp-tools · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Provide a way to define labels with regular expression replacement patterns #476
Open
@matentzn

Description

@matentzn

Right now, we are able to define simple lexical patterns like this:

"% biome" to define classes like "desert biome". Now the interesting thing is that in the case of biomes we define them in terms of "ecosystems", which means that the filler class is called something like "desert ecosystem". Now, we don't want to label our new class "desert ecosystem biome" - that's silly.

What would be good if we had a more flexible way to specify patterns for labels and definitions. For example something like:

text: "% biome"
match: r'(.*) ecosystem (biome)'
replacement: "$1 $2"

This would not be used for inference, just as a postprocessing step after the label is generated. I guess one may want to provide multiple match and replace rules, so his would be more flexible:

text: "% biome"
postprocessing:
  - match: r'(.*) ecosystem (biome)'
     replacement: "$1 $2"

@cmungall sounds a bit too crazy?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0