compromise icon indicating copy to clipboard operation
compromise copied to clipboard

Missing convert adjectives to their original form

Open snowyu opened this issue 6 months ago • 5 comments

There is no method to convert adjectives to their original form.

There are toComparative and toSuperlative methods, but toOriginal (toRoot) is not exposed:

https://github.com/spencermountain/compromise/blob/2831ad3f5393889d48ddd051f3c8f53fa758ce03/src/3-three/adjectives/plugin.js#L3-L13

snowyu avatar Jun 20 '25 22:06 snowyu

Hey @snowyu you're right - I may have that conjugation model somewhere. I forget why it was excluded from the API - there may have been a good reason. Let me pull it up in Monday and get back to you properly then. Cheers

spencermountain avatar Jun 22 '25 21:06 spencermountain

👍, For me, I need to use it simply to normalize the adjective as well. The conjugate() API is too weird for this usage.

snowyu avatar Jun 23 '25 23:06 snowyu

hey @snowyu - I can add a .superlatives().normalize() and a .comparatives().normalize() to the next release, if that would help you. Let me know if that works. cheers

spencermountain avatar Jun 25 '25 13:06 spencermountain

you're looking for this transformation, right? it was the snowiest day ever -> it was the snowy day ever it was snowier than yesterday -> it was snowy than yesterday

spencermountain avatar Jun 25 '25 13:06 spencermountain

Yes, but .superlatives().normalize() is a bit strange, why not .adjectives().normalize() as direct?

snowyu avatar Jun 26 '25 01:06 snowyu