biblissima / collatinus

Sources of Collatinus software - Latin lemmatizer, morphological analyzer and scansion
http://outils.biblissima.fr/en/collatinus
GNU General Public License v3.0
66 stars 15 forks source link

console version #53

Closed nikita-moor closed 4 years ago

nikita-moor commented 5 years ago

I would like to have a pure console version without server.

Server mode could be good for effective processing of big texts, but I would like to have a simple command-line tool, even at cost of slow initialization and data files reading. It would be nice for occasional requests.

Another acceptable solution would be a daemon process, or the app minimized to tray, so there no need to hold the application window open.

OS: Linux

ycollatin commented 5 years ago
Hey Nikita,

Le 4 septembre 2019, à 15h29, Nikita Moor écrivit :

I would like to have a pure console version without server.

Server mode could be good for effective processing of big texts, but I would like to have a simple command-line tool, even at cost of slow initialization and data files reading. It would be nice for occasional requests.

Another acceptable solution would be a daemon process, or the app minimized to tray, so there no need to hold the application window open.

OS: Linux

I have developed, under Linux Debian, a console application, much

lighter and faster. The language is Go, aka Golang : https://golang.org/. Limitation : only lemmatization, no dictionaries. Plus : you can swap toward medieval latin. If you want to compile it, you have to install the Go compiler, then :

$ git clone https://github.com/ycollatin/collatinus-go $ cd collatinus-go $ make $ cd bin $ ./collatinus -h Collatinus Go © Yves Ouvrard, GPL3 -a serveur tcp. avec l'option -p -f string nom du fichier à lemmatiser -h usage -i mode interactif -m string module lexical et morphologique (-m hagio) -o string nom du fichier de résultats -p <# port> Port du ѕerveur. doit être précédé de l'option -s (default "8080") -s Collatinus est serveur, port par défaut : 8080

Sorry for the french help language.

The -s option ($ ./collatinus -s) shoult let you use Collatinus with a browser : http://localhost:8080, but it seems it is down. If you do'nt want to compile, I can send you the executable, 9 Mo, without being sure it works for you. Cheers. -- Yves

PhVerkerk commented 5 years ago

Dear Nikita,

Another option is the Daemon (the source are in the branch with that name) we use for the on-line version of Collatinus. It is almost the same code as the server in the standard Collatinus, but without the GUI. You have to launch it in a console and forget it. It should answer to the same requests as the server on the internal port 5555. You can find the syntax of the main requests in the file https://github.com/biblissima/collatinus/blob/Daemon/bin/doc/server.html

This solution is heavier than the code in Go, but it includes extra features as the tagger or the scansion of texts.

Yours, Philippe.

nikita-moor commented 5 years ago

@PhVerkerk Daemon works fine, thank you.

@ycollatin Could I pass a word as an argument? I was not successful with the following variants:

collatinus -i amo
cat "amo" | collatinus
collatinus <<< $'amo'

Using expect I can take the result, but a simple way would be preferable.