Re: [sword-devel] Roman number converter

2020-09-20 Thread David Haslam
Aside:

Given that Roman numerals used for chapter numbers never exceed 150 and verse 
numbers never exceed 176, it suffices to use a lookup table for the required 
replacements in a Biblical source text.

That’s the approach I have used successfully when faced with this task. As 
usual for me, it was implemented using DataMystic TextPipe Standard on my 
Windows PC.

The method requires a whole word search with a restriction to the relevant 
context pattern for the vernacular scripture references.

Regards,

David

Sent from ProtonMail Mobile

On Sun, Sep 20, 2020 at 17:44, Fr Cyrille  wrote:

> Le 20/09/2020 à 15:53, Michael H a écrit :
>
>> I do for jedit.
>>
>> https://github.com/Avante-Vangard/Evangard/blob/master/Jedit/Macros/Evangard/AV_Fix_Roman_to_Decimal.bsh
>>
>> It's for circa 1900 scripture references where lower case roman pretty much 
>> uniformly represents chapter numbers.
>
> Wow! This is interesting! But can you explain how to use? I'm Ubuntu user.
>
>> On Sun, Sep 20, 2020 at 8:44 AM Fr Cyrille  wrote:
>>
>>> Hello,
>>> Do you know or have any script to convert roman numbers in a text to
>>> arab numbers?
>>>
>>> ___
>>> sword-devel mailing list: sword-devel@crosswire.org
>>> http://crosswire.org/mailman/listinfo/sword-devel
>>> Instructions to unsubscribe/change your settings at above page
>>
>> ___
>> sword-devel mailing list:
>> sword-devel@crosswire.org
>>
>> http://crosswire.org/mailman/listinfo/sword-devel
>> Instructions to unsubscribe/change your settings at above page___
sword-devel mailing list: sword-devel@crosswire.org
http://crosswire.org/mailman/listinfo/sword-devel
Instructions to unsubscribe/change your settings at above page

Re: [sword-devel] Roman number converter

2020-09-20 Thread Michael H
I replied privately to Fr Cyrille's question how to make jedit macros work
by mistake.

Here's the "howto" in case anyone later seeks to use this "script".

$sudo apt install jedit

Then run jedit at least once.

$jedit

Then put this file in .jedit/Macros

$cp AV_Fix_Roman_to_Decimal.bsh ~/.jedit/Macros/AV_Fix_Roman_to_Decimal.bsh

Then load your text into jedit, and select on the menu "Macros" --->
AV_Fix_Roman_to_Decimal

This specific script looks for lower case roman numerals that terminate
with a dot and a space.  This prevents the most false positives, but leaves
roman numerals that have OCR issues (roman numbers that terminate with
commas or nothing, and those that don't have a trailing space.) However, I
found this got me to 98% done, and had nothing I had to change back, where
more aggressive finds tended to over convert and I had to revert items from
roman numbers back to letters inside parts of words.

But it will at least give you something to start from for your use case.

Jedit that comes with Ubuntu (I'm still on 18) is very slow with large
files. The developers claim to have fixed it with jedit 5.6, but I haven't
seen success at speeding up when I tried preview builds of 5.6 (yet).

On Sun, Sep 20, 2020 at 11:44 AM Fr Cyrille  wrote:

>
>
> Le 20/09/2020 à 15:53, Michael H a écrit :
>
> I do for jedit.
>
>
> https://github.com/Avante-Vangard/Evangard/blob/master/Jedit/Macros/Evangard/AV_Fix_Roman_to_Decimal.bsh
>
> It's for circa 1900 scripture references where lower case roman pretty
> much uniformly represents chapter numbers.
>
> Wow! This is interesting! But can you explain how to use? I'm Ubuntu user.
>
>
> On Sun, Sep 20, 2020 at 8:44 AM Fr Cyrille 
> wrote:
>
>> Hello,
>> Do you know or have any script to convert roman numbers in a text to
>> arab numbers?
>>
>> ___
>> sword-devel mailing list: sword-devel@crosswire.org
>> http://crosswire.org/mailman/listinfo/sword-devel
>> Instructions to unsubscribe/change your settings at above page
>>
>
> ___
> sword-devel mailing list: 
> sword-devel@crosswire.orghttp://crosswire.org/mailman/listinfo/sword-devel
> Instructions to unsubscribe/change your settings at above page
>
>
>
___
sword-devel mailing list: sword-devel@crosswire.org
http://crosswire.org/mailman/listinfo/sword-devel
Instructions to unsubscribe/change your settings at above page

Re: [sword-devel] Roman number converter

2020-09-20 Thread Fr Cyrille


Le 20/09/2020 à 15:53, Michael H a écrit :
> I do for jedit. 
>
> https://github.com/Avante-Vangard/Evangard/blob/master/Jedit/Macros/Evangard/AV_Fix_Roman_to_Decimal.bsh
>
> It's for circa 1900 scripture references where lower case roman pretty
> much uniformly represents chapter numbers.
Wow! This is interesting! But can you explain how to use? I'm Ubuntu user.
>
> On Sun, Sep 20, 2020 at 8:44 AM Fr Cyrille  > wrote:
>
> Hello,
> Do you know or have any script to convert roman numbers in a text to
> arab numbers?
>
> ___
> sword-devel mailing list: sword-devel@crosswire.org
> 
> http://crosswire.org/mailman/listinfo/sword-devel
> Instructions to unsubscribe/change your settings at above page
>
>
> ___
> sword-devel mailing list: sword-devel@crosswire.org
> http://crosswire.org/mailman/listinfo/sword-devel
> Instructions to unsubscribe/change your settings at above page

___
sword-devel mailing list: sword-devel@crosswire.org
http://crosswire.org/mailman/listinfo/sword-devel
Instructions to unsubscribe/change your settings at above page

Re: [sword-devel] Roman number converter

2020-09-20 Thread Michael H
I do for jedit.

https://github.com/Avante-Vangard/Evangard/blob/master/Jedit/Macros/Evangard/AV_Fix_Roman_to_Decimal.bsh

It's for circa 1900 scripture references where lower case roman pretty much
uniformly represents chapter numbers.

On Sun, Sep 20, 2020 at 8:44 AM Fr Cyrille  wrote:

> Hello,
> Do you know or have any script to convert roman numbers in a text to
> arab numbers?
>
> ___
> sword-devel mailing list: sword-devel@crosswire.org
> http://crosswire.org/mailman/listinfo/sword-devel
> Instructions to unsubscribe/change your settings at above page
>
___
sword-devel mailing list: sword-devel@crosswire.org
http://crosswire.org/mailman/listinfo/sword-devel
Instructions to unsubscribe/change your settings at above page

[sword-devel] Roman number converter

2020-09-20 Thread Fr Cyrille
Hello,
Do you know or have any script to convert roman numbers in a text to
arab numbers?

___
sword-devel mailing list: sword-devel@crosswire.org
http://crosswire.org/mailman/listinfo/sword-devel
Instructions to unsubscribe/change your settings at above page