Re: [basex-talk] string:levenshtein producing incorrect results?

2024-05-10 Thread Christian Grün
Hi Hack,

That’s been helpful, thanks. We’ve aligned our Damerau/Levenshtein
algorithms, the latest version should behave as expected [1, 2].

Best,
Christian

[1] https://files.basex.org/releases/latest/
[2]
https://github.com/BaseXdb/basex/commit/6889ac108c6b32d448d640d53ec098bbb8938f06


On Thu, May 9, 2024 at 8:29 AM Jack Steyn  wrote:

> Hi,
>
> According to my copy of BaseX 10.7,
>
> string:levenshtein('oil field', 'oilfield')
>
> and
>
> string:levenshtein('oil field', 'coalfield')
>
> both return the same value, 0.7778.
>
> My understanding is that the Levenshtein-Damerau distance between 'oil
> field' and 'oilfield' is 1 and between 'oil field' and 'coalfield' is 3, so
> following the formula from
> https://docs.basex.org/wiki/String_Module#string:levenshtein
>
> 1.0 – distance / max(length of strings)
>
> should give 0.888... and 0.666... respectively.
>
> Am I off-base here or is there something awry with string:levenshtein?
>
> Cheers,
>
> Jack
>


Re: [basex-talk] BaseX installation cannot see Java

2024-05-10 Thread Christian Grün
Thanks for the insight. We’ll need to ensure that the check runs with all
versions of Windows that we support, but if a similar problem is reported
back to us again, we’ll think about a multi-step version check.

Best,
Christian



On Thu, May 9, 2024 at 11:09 PM  wrote:

> Mr. Grun,
>
> It seems that the Windows Management Instrumentation Command-line (WMIC)
> command line utility gives a reliable result in windows.
>
> https://www.techtarget.com/searchenterprisedesktop/definition/Windows-Manage
> ment-Instrumentation-Command-line-WMIC
> 
>
> It is deprecated, but working on any Windows OS, including Windows Server
> 2022.
>
> On my home machine with Windows 10 OS the following command
> c:\>wmic product where "Name like '%JRE%' or name Like'%Java%' or name
> Like'%JDK%' " get name,Vendor,Version
>
> emits the following 4 (four) Java installations:
>
> Name  Vendor
> Version
> Java(TM) SE Development Kit 18.0.2 (64-bit)   Oracle Corporation
> 18.0.2.0
> Java 8 Update 391 (64-bit)Oracle Corporation
> 8.0.3910.13
> Eclipse Temurin JDK with Hotspot 21.0.2+13 (x64)  Eclipse Adoptium
> 21.0.2.13
> Java Auto Updater Oracle Corporation
> 2.8.391.13
>
> To see all available entries:
> c:\>wmic product where "Name like '%JRE%' or name Like'%Java%' or name
> Like'%JDK%' " get * /format:textvaluelist
>
> So, you can try to integrate wmic based method in the BaseX Windows
> installer.
>
> Regards,
> Yitzhak Khabinsky
>
>
>