+1 vote

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

Paratext by (224 points)
reshown

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:

by (8.0k points)
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 (224 points)
Welcome to Support Bible, where you can ask questions and receive answers from other members of the community.
For we were all baptized by one Spirit so as to form one body—whether Jews or Gentiles, slave or free—and we were all given the one Spirit to drink.
1 Corinthians 12:13
2,476 questions
5,170 answers
4,866 comments
1,283 users