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

Component.from_text not capturing all parts of text #139

Open
Zabamund opened this issue May 7, 2021 · 1 comment
Open

Component.from_text not capturing all parts of text #139

Zabamund opened this issue May 7, 2021 · 1 comment

Comments

@Zabamund
Copy link
Collaborator

Zabamund commented May 7, 2021

This method on Component seems to work fine in some cases but not always, here is an example:

from striplog import Component

sample0 = Component.from_text('Grey fine sandstone.', lexicon)
sample1 = Component.from_text('Light blue marl with interbedded shale with good shows', lexicon)

sample0 yields:
image

while sample1 yields:
image

@kwinkunks
Copy link
Member

It just comes down to the lexicon. The text is parsed in a very naive way, and it's up to the user to compile an appropriate lexicon for their task.

That said, I think the default splitter 'with' should prevent components getting mixed like this. So that is a bug.

The other thing here is that 'marl' is not in the default lexicon, but 'mrl' is (as an abbreviation). If we compile a more comprehensize list for the 'lithology' part of the default lexicon, it's trivial to add it. So that could be an enhancement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants