gnames / gnparser

GNparser normalises scientific names and extracts their semantic elements.
MIT License
38 stars 4 forks source link

old 32bit Windows binary request #192

Closed abubelinha closed 2 years ago

abubelinha commented 3 years ago

Our database runs on an old 32bit Windows XP machine.

Are there any chances to find a gnparser binary which we can use there? (even if it is an old version) Thanks a lot in advance

dimus commented 3 years ago

@abubelinha I made an experimentatl win32 binary for v1.3.3, can you check if it works?

abubelinha commented 3 years ago

Thanks @dimus I suppose this is the file: https://github.com/gnames/gnparser/releases/download/v1.3.3/gnparser-v1.3.3-win-32.zip

I uncompressed it and tried the executable in that machine, but I got a messagebox saying "gnparser.exe is not a valid Win32 application"

On my Win7 64bit laptop, it worked perfectly (like the 64bit gnparser version).

abubelinha commented 3 years ago

BTW the machine has Microsoft Windows XP Professional v.2002, with Service Pack 3 Intel(R) Core(TM)2 Quad CPU, Q9450 @ 2.66GHz RAM 3.48 GB

dimus commented 3 years ago

I removed the binary for win32, I guess there is no easy solution for this. Is it possible for you to access REST api at https://parser.globalnames.org? It is very fast, especially if you send names in butches of several thousands.

abubelinha commented 3 years ago

OK. I’ll try that. I guess to send thousands I should follow the POST example here? https://github.com/gnames/gnparser/blob/master/README.md#usage-as-a-rest-api-interface

dimus commented 3 years ago

yes, you can also use https://apidoc.globalnames.org/gnparser to play with API, get a feel of it, and also it describes all JSON fields of the output.

dimus commented 2 years ago

Closing this ticket. Looks like there is no easy solution, and the number of win32 users is small and is decreasing, so we are skipping this binary. Looks like remote use of https://parser.globalnames.org API is a solution here.

abubelinha commented 2 years ago

Just for reference, this is what I finally did:

1) Install gnparser on another machine of the LAN (i.e., IP 192.168.1.100). 2) Start a gnparser server in that machine with gnparser -p 8080 3) Make calls to that server from Win32 machines. Steps 1 & 2 are just in case you don't have internet connection. Otherwise, use url = "https://parser.globalnames.org/api/v1/" in this minimal Python example:

    url = "http://192.168.1.100:8080/api/v1/"
    data = {
      "names": [
        "Pleurosigma vitrea var. kjellmanii H.Peragallo, 1891a",
        "Bubo bubo"
      ],
      "withDetails": True,
      "csv": False
    }
    import requests
    response = requests.post(url, json=data)
    print(response)

Thanks!

dimus commented 2 years ago

@abubelinha, it is a reasonable approach. What is the project you use gnparser for? Just curious

abubelinha commented 2 years ago

Nothing really very specific. I work for a natural history museum, but this is not for any particular project.

I am just tired of having to develop my own quick, dirty & bad functions for comparing "canonical names" coming from different sources (online checklists, gbif data, my own field notes, and different collection databases in a variety of file formats: mysql, Ms-Access-Excel, txt, ... some of them maintained in old Win32 machines). gnparser works great and it's easy to call from python (which is pretty compatible with all machines and has packages for reading all file formats I need to use).

abubelinha commented 2 years ago

I am not sure this deserves a new issue or not. I was wondering how many names is it advisable to include in a single server api call.

If I have a list of 45000 names to parse, is it better (for the server) to receive 45 calls, 1000 names each call ... or just one call with 45000 names?

On the other hand I guess my Win32 Python application will probably prefer not to parse such a big json response all at once. But that's another question. Right now I am asking about remote server health.

dimus commented 2 years ago

I would say 50000 names should be OK for one call

dimus commented 2 years ago

On the other hand I guess my Win32 Python application will probably prefer not to parse such a big json response all at once.

Also note that gnparser does not generate one json with 50000 elements, it generates 50000 json strings. So for python it does not really matter, I think, to parse 1 name or 50000, except for the memory spent to keep al 50000 json strings