+1 vote
449 vues

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

Ancienne publication - affichée dans sa langue d'origine
Paratext par (241 points)
réaffiché | 449 vues

3 Réponses

0 votes
Meilleure réponse

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.

Ancienne publication - affichée dans sa langue d'origine
par (1,8k points)
réaffiché
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
Ancienne publication - affichée dans sa langue d'origine
par (9,9k points)
modifié par
0 votes

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

Ancienne publication - affichée dans sa langue d'origine
par (241 points)

Questions connexes

0 votes
1 réponse 272 vues
En tant qu'utilisateur, je souhaite savoir combien de mots se trouvent dans un livre ou plusieurs livres en particulier.
Phil_Leckrone 9,9k posée févr. 8, 2024
0 votes
0 réponses 173 vues
(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).
anonyme posée avr. 10, 2015
0 votes
0 réponses 188 vues
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
posée févr. 23, 2017
0 votes
3 réponses 279 vues
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 posée nov. 8, 2019
+1 vote
1 réponse 345 vues
Dans la traduction de 1 Rois 7, nous voulons utiliser des fractions lorsque nous donnons le nombre sous forme de chiffres, par ... Y a-t-il un autre paramètre que j'ai manqué ?
JohnBrownie 385 posée oct. 16, 2023
Welcome to Support Bible, where you can ask questions and receive answers from other members of the community.
For just as each of us has one body with many members, and these members do not all have the same function, so in Christ we, though many, form one body, and each member belongs to all the others.
Romans 12:4-5
3,045 questions
6,005 réponses
5,671 commentaires
2,026 utilisateurs