+1 vote
636 views

Hi,
How to calculate number of words in chapter or in one book. It should not include marking.

Paratext by (241 points)
reshown | 636 views

3 Answers

0 votes
Best answer

Here is some regex that will do a similar thing in RegexPal:
(?<=(\\(?!(b|c|cp|f|fr|id\w*|jmp|periph|rem|toc\d|usfm|v|vp|x|xo)\s)\+?\w+[\s\*]|[cv]\s+\S+\s))[^\\]*?(?=\\|\Z):::\S+
Use Count (CTRL-O) to find all the words in a an entire project down to a single book.This will give you more words but it is probably more accurate. The Wordlist excludes numbers and words in certain reference fields like \r \ior and sometimes \xt which may not need to be checked for spelling, but should probably be included in a word count.

Detail
This is an explanation of the regex:
The first part is a context where you want to count words. It excludes markers as well as chapter and verse numbers: (?<=(\\(?!(b|c|cp|f|fr|id\w*|jmp|periph|rem|toc\d|usfm|v|vp|x|xo)\s)\+?\w+[\s\*]|[cv]\s+\S+\s)[^\\]*?(?=\\|\Z):::

  • It includes a list of markers whose contents you probably do not want counted:
    (?!(b|c|cp|f|fr|id\w*|jmp|periph|rem|toc\d|usfm|v|vp|x|xo)\s)
  • This part excludes chapter numbers and verse numbers: [cv]\s+\S+\s

The second part \S+ simply finds text separated by spaces. Since it is greedy it will find text up to a space, end of string, or end of file.

by (1.8k points)
reshown
0 votes
Here is a quick way to get a count of any selection (based on Word List options) of verse, chapter, section, book, or books. You use Excel to get the full count.
Here is a Quick Tip video: https://www.loom.com/share/21b31bb8bf37492695e1b27589f75f43?sid=60a34a28-7f27-44ec-a9e3-dcbcbc33de86
by [Expert]
(10.0k points)

edited by [Expert]
0 votes

Thank you so much anon848905 exactly I want like this, I tried by Regex \w+ but it did not give exactly value.

by (241 points)

Related questions

0 votes
1 answer 379 views
As a user I'd like to know how many words are in a particular book or books.
[Expert]
Phil_Leckrone
10.0k
asked Feb 8, 2024
0 votes
0 answers 293 views
(anon451647 writes) This line (in PrintDraftChanges.txt) will change a plus sign to a thin space if it has a non- ... not match them (especially if they are non-Roman letters).
anonymous asked Apr 10, 2015
0 votes
0 answers 243 views
To move a book from one difficulty level to another, see either of the following: [How do I change the expected rate ... /520) (the Change the difficulty level of a book section)
[Expert]
anon421222
735
asked Feb 23, 2017
0 votes
3 answers 426 views
Hello, Anytime I use the \ip Introduction - Paragraph marker in Paratext, the words turns grey. I would be grateful if you can help me correct it. Thank you. anon878803
anon878803 132 asked Nov 8, 2019
+1 vote
1 answer 470 views
In translating 1 Kings 7, we want to use fractions when we give the number as numerals, e.g. in 7:10: Aitoka ... can be numbers. Is there some further setting that I have missed?
JohnBrownie 425 asked Oct 16, 2023
Welcome to Support Bible, where you can ask questions and receive answers from other members of the community.
And let us consider how we may spur one another on toward love and good deeds, not giving up meeting together, as some are in the habit of doing, but encouraging one another—and all the more as you see the Day approaching.
Hebrews 10:24-25
3,064 questions
6,024 answers
5,695 comments
2,036 users