
Show HN: I got tired of parsing texts, hope you find Komlog useful - jcazor
http://www.komlog.io
======
fiatjaf
Not directly related, but I've been looking for a human-friendly DSL for
creating simple parsers. Can anyone recommend me one?

I'm looking for something that would take a parser definition like

    
    
      <user> (likes|prefers) <fruit>
    

and generate a parser that will turn

    
    
      Joanna likes apples
    

into

    
    
      {"user": "Joanna", "fruit": "apples"}
    

Does that make sense? I know it is easy to write something like that, but
maybe there is already something battle-tested out there.

~~~
ttd
For your example, a regular expression with named capture groups would be all
you'd need, e.g.:

[https://pythex.org/?regex=%5E(%3FP%3Cuser%3E.%2B%3F)%20(like...](https://pythex.org/?regex=%5E\(%3FP%3Cuser%3E.%2B%3F\)%20\(likes%7Cprefers\)%20\(%3FP%3Cfruit%3E.%2B%3F\)%24&test_string=Joanna%20likes%20apples&ignorecase=0&multiline=0&dotall=0&verbose=0)

If you start to need more complex features in your grammar such as recursive
nonterminals, there are many parser generators out there that support input in
EBNF, which (in my opinion) is quite human-readable.

------
fiatjaf
Impressive screenshots, but how does it work? Is it some kind of "artificial
intelligence"? Can you configure your parsers? Is it some kind of
preconfigured regex?

Is it in the same domain as [https://monique.io/](https://monique.io/)?

~~~
jcazor
Komlog identifies metrics directly in plain texts using machine learning
algorithms.

You can send any text, structured or unstructured, and it will try to identify
metrics. If Komlog don't identify what you want, you can teach him, so the
system learns from your feedback.

You can create plugins too (example: [https://github.com/komlog-
io/kpack_linux/tree/master/kpack_l...](https://github.com/komlog-
io/kpack_linux/tree/master/kpack_linux)), so people can use and distribute
them.

Komlog is a FaaS, so you can subscribe to metrics and create plugins to
execute functions when new data is received for them

------
jcazor
As a system administrator I lived in the command line interface. That's OK for
me, but one day I got tired of processing texts and cleaning up data looking
for metrics, so I decided to create Komlog for him to take care of that. Hope
you find it useful.

------
jcazor
You can read a getting started post here:

[https://medium.com/komlog/getting-started-with-
komlog-24345a...](https://medium.com/komlog/getting-started-with-
komlog-24345af7b09b)

