How do you find all word forms?

Everything related to our flagship word processor.
Post Reply
triarius
Posts: 2
Joined: 2015-02-27 13:29:34

How do you find all word forms?

Post by triarius »

I'm currently in the process of switching from MS Word to Nisus Writer Pro. One of the things I need to do frequently is "find all word forms," for example, finding all forms of the verb "be," (am, is, are, etc.) How can this be done in Nisus Writer Pro?
adryan
Posts: 561
Joined: 2014-02-08 12:57:03
Location: Australia

Re: How do you find all word forms?

Post by adryan »

G’day, triarius et al

To find all occurrences of each member of a set using PowerFind Pro, separate each member of the set with a vertical line in the “Find what” field of the Find/Replace dialog box.

Thus, “lorem|ipsum|dolor” in PowerFind Pro with Find Next will find the next occurrence of any of these three words, whichever one occurs first. The same expression in PowerFind Pro with Find All will find all occurrences of these three words.

So you want an expression of the form “be|been|being|am|are|is|was|will be”, or whatever.

Unfortunately, Nisus Writer does not know how to conjugate verbs, so you will have to supply all the relevant forms of a particular word yourself. Apple’s Dictionary and the Shorter Oxford English Dictionary conveniently list these forms in the opening paragraph of a word’s entry. Inconveniently, neither of these Applications is AppleScriptable.

It would be possible to copy and paste such a paragraph into a Nisus document and then extract the required words/expressions (as they are prominently displayed in boldface) using Find/Replace. Depending on the complexity of your requirements, this could all be incorporated in a Nisus macro which might, for example, use an array to store all forms of a base word.

Cheers,
Adrian
MacBook Pro (M1 Pro, 2021)
macOS Ventura
Nisus Writer user since 1996
Emilio_Speciale
Posts: 27
Joined: 2013-11-04 06:16:07

Re: How do you find all word forms?

Post by Emilio_Speciale »

Thanks for the answer: a nice trick.
I have another question related to this:
Is there a way/macro that finds and highlights identical words on a document?
Thanks.
adryan
Posts: 561
Joined: 2014-02-08 12:57:03
Location: Australia

Re: How do you find all word forms?

Post by adryan »

G’day, Emilio et al

Just insert the word you wish to find in the “Find what” field of the Find/Replace dialog box and check or uncheck each of the three checkboxes there, as desired. Hit the Find All button, then click once on your document window and choose Format > Highlight > Green (or the color of your choice). You will have to click once more in your document window to see your changes take effect.

This could easily be made into a macro, but I generally reserve macros for complicated tasks, tasks I think I will use a lot, or tasks I wish to incorporate in some extended automated workflow.

Cheers,
Adrian
MacBook Pro (M1 Pro, 2021)
macOS Ventura
Nisus Writer user since 1996
Emilio_Speciale
Posts: 27
Joined: 2013-11-04 06:16:07

Re: How do you find all word forms?

Post by Emilio_Speciale »

Thank you Adrian!
This seems a nice feature.
But I am looking for another function (and I suppose it requires a complicated macro, if it is possible…).
The function (macro) should be able to highlight all the worlds that are repeated in the document. I came across this because I was building a word stop-list for Italian. I gathered different lists in one file. But of course now I have similar words and I want to clean the list and get rid of the duplicates.
Maybe it is not possible!
Thanks
adryan
Posts: 561
Joined: 2014-02-08 12:57:03
Location: Australia

Re: How do you find all word forms?

Post by adryan »

G’day, Emilio et al

There is a macro that might do want you want:–

Macro > Document > Create Word List (v4)

Cheers,
Adrian
MacBook Pro (M1 Pro, 2021)
macOS Ventura
Nisus Writer user since 1996
Emilio_Speciale
Posts: 27
Joined: 2013-11-04 06:16:07

Re: How do you find all word forms?

Post by Emilio_Speciale »

I knew that there was a macro…………
Thank you very much!
Have a nice day. :)
triarius
Posts: 2
Joined: 2015-02-27 13:29:34

Re: How do you find all word forms?

Post by triarius »

adryan wrote:G’day, triarius et al

To find all occurrences of each member of a set using PowerFind Pro, separate each member of the set with a vertical line in the “Find what” field of the Find/Replace dialog box.

Thus, “lorem|ipsum|dolor” in PowerFind Pro with Find Next will find the next occurrence of any of these three words, whichever one occurs first. The same expression in PowerFind Pro with Find All will find all occurrences of these three words.

So you want an expression of the form “be|been|being|am|are|is|was|will be”, or whatever.

Unfortunately, Nisus Writer does not know how to conjugate verbs, so you will have to supply all the relevant forms of a particular word yourself. Apple’s Dictionary and the Shorter Oxford English Dictionary conveniently list these forms in the opening paragraph of a word’s entry. Inconveniently, neither of these Applications is AppleScriptable.

It would be possible to copy and paste such a paragraph into a Nisus document and then extract the required words/expressions (as they are prominently displayed in boldface) using Find/Replace. Depending on the complexity of your requirements, this could all be incorporated in a Nisus macro which might, for example, use an array to store all forms of a base word.

Cheers,
Adrian
Thanks, Adrian.

Clumsy, a bit laborious, but it works. Makes me slightly curious as to how MS Bloatware (Word) does it. Such a feature is highly useful for some editing tasks, such as finding passive sentences. I say "slightly curious" because it is probably a patch on a bug of a poorly thought out bit of code in Word. I could go further on a diatribe against an Evil Empire, but we all have better things to do—like write and edit. :roll:
Post Reply