Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

As a User I want to have both parse ary and parse stream options #122

Closed
dimus opened this issue Jan 6, 2021 · 5 comments
Closed

As a User I want to have both parse ary and parse stream options #122

dimus opened this issue Jan 6, 2021 · 5 comments
Milestone

Comments

@dimus
Copy link
Member

dimus commented Jan 6, 2021

Currently, gnpaser moved to use parsing by chunks instead of parsing a stream. This implementation allows to have the same order of input and output, but it is not good to using gnpaser as a "pipe in pipe out", because it collects names into a "buffer" until they are parsed, while pipe in pipe out approach sends and receives names one by one.

@dimus
Copy link
Member Author

dimus commented Jan 11, 2021

@LocoDelAssembly, for using pipes in Ruby code one in has to immediately return one out. In old code it was achieved by a stream that would take one name at a time instead of an array of names.

It is possible to avoid streaming method by reducing the size of a batch to 1. So I suspect we can close this ticket for now. An option for the batch size is added already.

@dimus dimus closed this as completed Jan 11, 2021
@dimus dimus added this to the iter 16 milestone Jan 11, 2021
@dimus
Copy link
Member Author

dimus commented Jan 11, 2021

The v1.0.0 code is located in 102-clean branch, an example of running 1 name at a time is

gnparser -b 1 "Pardosa moesta" 

@dimus dimus reopened this Jan 12, 2021
@dimus
Copy link
Member Author

dimus commented Jan 12, 2021

Looks like we need to have streaming option, because otherwise pipe solution becomes too hackish

@dimus
Copy link
Member Author

dimus commented Jan 13, 2021

It seems that b47531d
allows to close the issue again for now

@dimus dimus closed this as completed Jan 13, 2021
@dimus dimus reopened this Jan 15, 2021
@dimus
Copy link
Member Author

dimus commented Jan 15, 2021

Looks like we do need a stream. I have an expreimental package to order unordered streams, and I will try to use it here. https://github.com/gnames/gnlib/blob/master/organizer/organizer.go

dimus added a commit that referenced this issue Jan 16, 2021
dimus added a commit that referenced this issue Jan 18, 2021
@dimus dimus closed this as completed Jan 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant