+1 vote
429 vues

Exporting the Wordlist to HTML is a nice feature, except that for many users including me, working with HTML is one of the “mysteries of the universe.” I would very much like to have a list in plain text, that could be used as the basis for a dictionary in Word, or for other such features. Anyone have a process to get a plain text listing of words that are currently marked as spelled correctly in PT?

anon101508

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

3 Réponses

+1 vote
Meilleure réponse

All possible disclaimers apply, these are old notes, you will destroy your data, only do this if you can handle all the consequences blablabla:

Have a new sheet in LibreOffice Calc.

Create a working copy of the spelling file from PT, normally found in

…path to PT projects\your-lang-CODE\SpellingStatus.xml

and put it somewhere out of the PT folders structure.

In Calc open the SpellingStatus.xml by > menu > Data > XML Source…

If XML Source is greyed out (unavailable) it needs to be activated:
menu > Tools > Options > LibreOffice > Advanced > tick box at the bottom of window: “Enable experimental features”.

In the little import window click in the left “Map to Document” pane on “Word” and five lines get selected in blue.

In “Mapped cell” fill in $Sheet1.$A$1 or use the clicker. No worries, you only need to provide one cell, even if you have got lots of spelling data; it will spill over.

Hit Import.

Now you got nice pure language data.

You can have all correct words nicely listed like this:

Select the entire sheet (click top left) and then unselect the top row with the headings.

menu > Data > Sort…

Sort Key 1 must be the column B (for State)

Sort Key 2 is optional but column A (Word) is helpful

Hit OK.

The NNNNNN project has got many proper names with Specific Case (and a few sentence-initial “false hits”) and with this trick, you can pull them all into a free column:

just go to the top free cell, should be normally E2 and enter this formula: =IF(D2<>"";D2;A2)

the formula is simple: if there is a not-empty cell for Special Case it gets copied, otherwise the default word from column A gets copied.

Now select your top-cell (E2) and select downwards (for example with Shift+arrow key or Shift+page-down) as many rows as you have correct words. Then do menu > Sheet > Fill Cells > Down

Now you got lots of correct words in Column E for whatever use (spice into your Hunspell file, but adapt the line-count and remove doubles).

Note: I have not spent time investigating whether it is worth harvesting the “corrections” from the wrong words. Those are also all good words, but I suspect they are all listed under good words anyway. To be checked.

If this does not make sense to you, please just forget, presently I have no time to do “support” for this little hack. Those are basically notes to myself from a while back. If you have a better solution please let us know here.

Tim

Ancienne publication - affichée dans sa langue d'origine
par (934 points)
+1 vote

Do you mean exporting as XML (not HTML)? That’s the only option I see.

Typically I just open up the resulting .xml file and do find/replace to get rid off all the information I don’t want cluttering up the text. With regular expressions you can find and delete more complex kinds of searches.

So, to get the list of words that are spelled correctly, I’d search for ^.*?Incorrect.*?$ and replace it with nothing (i.e. delete it). Similarly search and delete ^.*?Unknown.*?$ (there’s unquestionably a way to do this in one search, but I general use what I know and don’t do the research to find how to search for “anything but Correct”).

I would then use find/replace to delete information I don’t need, like hyphenation status and maybe the count.

Ancienne publication - affichée dans sa langue d'origine
par (1,9k points)
réaffiché
+1 vote

anon101508, if you export the xml then tell Excel to open the file and select ‘As an xml table’ it presents a pretty reasonable table from which I would think you could sort and select the columns you want to put into Word.

JG

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

That’s much better and easier. Just did it two days ago, but I had hands on help from someone much more experienced in this area.

Ancienne publication - affichée dans sa langue d'origine

Questions connexes

0 votes
1 réponse 211 vues
According to my old notes, I get the cleanest text via copy and paste, with my View Setting set to unformatted . I ... best way to get clean text with valid markers out of PT8.
Tim 934 posée mars 8, 2019
+1 vote
1 réponse 197 vues
Dear All, I would like to how can I mark and display the scriptural text with a certain color or ... International Certified) ACC Coach(International Coach Federation) GMT+8.00
anon221954 128 posée déc. 17, 2019
0 votes
1 réponse 272 vues
As a user I'd like to know how many words are in a particular book or books.
Phil_Leckrone 9,9k posée févr. 8, 2024
0 votes
2 réponses 139 vues
In addition to printing the current version of the vernacular text our team will be reviewing, I want to print the ... but would like to print it without changes indicated. Thanks
Jan Gossner 232 posée févr. 2, 2025
Welcome to Support Bible, where you can ask questions and receive answers from other members of the community.
Give proper recognition to those widows who are really in need.
1 Timothy 5:3
3,044 questions
6,003 réponses
5,671 commentaires
2,026 utilisateurs