INCATools / INCATools/dosdp-tools

Provide a way to define labels with regular expression replacement patterns

Open
#476 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Scala
Stars
33
Forks
5
PR merge metrics
No merged PRs in 30d

Description

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?

Contributor guide

No contributing guide indexed for this repository

Research direction

The issue names no implementation files, tests, or entry points. Start by locating the existing lexical label-pattern handling and its configuration schema, then determine how postprocessing rules would be represented and applied; done means supporting the shown match and replacement behavior without using it for inference.

Written by the indexing model from the issue text.

Assessment

Tech stack
scala
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.