JacquesCarette / Drasil

Generate all the things (focusing on research software)
https://jacquescarette.github.io/Drasil
BSD 2-Clause "Simplified" License
136 stars 25 forks source link

Erroneous use of nounPhraseSP in `drasil-example` #3782

Open NoahCardoso opened 3 weeks ago

NoahCardoso commented 3 weeks ago

I have noticed that in glassbr almost all words defined in Unitals.hs are made using nounPhraseSP from #3777 and #2299. Is there a reason for this? nounPhraseSP blocks words from being plural. For example, the word "explosion" was a nounPhraseSP even though it has the plural form "explosions". I think that we should use cn' rather than nounPhraseSP as it allows plural. This nounPhraseSP default is also used a lot in the other examples not just glassbr.

| cn | Create a self-plural, common-noun NounPhrase | String -> NP | | cn' | Create a common-noun NounPhrase which becomes plural by adding "s" | String -> NP |

image

image

balacij commented 3 weeks ago

It might've just been "pattern following" when writing code. I think it's safe to say that we can go ahead and just start fixing the other ones too.

JacquesCarette commented 3 weeks ago

Agreed, this was likely copy-pasta without understanding of the consequences.

NoahCardoso commented 3 weeks ago

While working on this I have come across some special cases where there are multiple words within the sentence and I am not sure how to handle the plural form. For example, should the plural of this sentence be probabilities of failure, probability of failures or probabilities of failures https://github.com/JacquesCarette/Drasil/blob/6ce1c24e10255132c1bbd73a716dcec87c871093/code/drasil-example/glassbr/lib/Drasil/GlassBR/Unitals.hs#L132

smiths commented 3 weeks ago

@NoahCardoso can you give the context (sentence) in which the phrase in question is being used? There is one plural form that would work in all situations.

NoahCardoso commented 3 weeks ago

The phrase is not used in the plural form in the text. Should it still be able to be used in the plural form? If it were I assume that the plural would be probabilities of failure. image

smiths commented 3 weeks ago

@NoahCardoso I don't think there should be a plural for this phrase. If someone were to use this knowledge in another application, we don't know what they would want. I don't see value in guessing.

NoahCardoso commented 4 days ago

I changed some of the examples I mentioned in glassbr.unitals. I think that unless the plural form of the word is needed there is not really a point in changing it to a nounPhraseSP into cn'. @balacij what do you think?