Grammatical categories
-
Hii! I’m using Notepad for my lessons, so my understanding of this is very limited. We have to make an assignment for class and I just don’t seem to understand how to specify grammatical categories correctly when it comes to searching for regular expressions.
For example, we have a text and we have to search for all the ocurrencies of nouns ending in -ity. As far as I have understood, the expression would be {NN,NNS}+_ity$, but I just keep getting error.
If any of you could help me, I’d be really grateful.
-
@maría-del-mar-muñoz I can’t tell if you’re supposed to be learning about regex, or something to do with language.
If it’s language, simply searching for
ity
should get you most of the way there, no?If you’re actually supposed to be learning regex, the expression you showed is very wrong. You need to spend some time with the docs, and play around with very simple expressions. Try including one new rule at a time to build competence. I suggest you learn what
\w
represents, as well as the*
modifier. (I could give you more, but you’re a student, you need to study!)