-
Notifications
You must be signed in to change notification settings - Fork 2
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
Handle multiple K codes in single data row #44
Comments
Hm. It would probably break a bunch of code, including the stop-code-inferring code to just insert a list in that column. But it is a good question what should be done when a row contains multiple entries with the same code... In the examples you've found in the wild, how is this used / why isn't it just multiple rows? |
The file format limits a row to a specific depth (one row per depth). So you may have several comment codes in a specific depth. In this example both flushing and hammering start:
|
Ah, you are indeed right " information collected at predetermined intervals, indicated by a sync-parameter". But is this evenly sampled-requirement actually fulfilled in practice in the wild? |
Yes, the readings are at set depth intervals, and the data files adhere to this. The example above is from a customer complaining that we do not register both flushing and hammering starting at depth 1.33. |
Conceptually I still think multiple rows with the same depth would be better/easier. But maybe we should have a call about this and brainstorm different solutions (I'm back from full time parental leave from this week, working part time from now on)? |
I have started building a new SGF parser to handle this problem with repeated comment codes and texts. The new parser will be made to handle our specific needs. Today we use the libsgfparser for a first pass, and then continue with another pass with our internal parser. The new package I hope will do most of our parsing in one go (but probably needs to make two passes). It will be open-sourced, but more to our needs. I'm also afraid to do changes in the libsgfparser that affect your usage. My plan is:
So
becomes
so we don't miss any codes. Which comment code to keep is done by a prioritization; codes in the 90s range must be kept (stop codes), then codes in the 40s range (for detecting bedrock), then other codes. If you want the same behaviour in libsgfparser, I will be happy to submit a PR for this. |
Moving to another field isn't a bad idea. |
Just published https://pypi.org/project/sgf-parser version 0.0.1a1 |
I have run into a problem parsing SGF files, where a single data row contains several code
K
.Are you open to a PR that will change the result type from
int
tolist[int]
for codeK
?In addition, the same applies to
T
codes (may get multiple on the same line).The text was updated successfully, but these errors were encountered: