3 ms·
Show HN: I got tired of parsing texts, hope you find Komlog useful
- jcazor 9y agoAs 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.
- fiatjaf 9y agoImpressive 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 9y agoKomlog 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_linux https://github.com/komlog-io/kpack_linux/tree/master/kpack_l...), 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
- fiatjaf 9y agoNot 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 9y agoFor 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(likes%7Cprefers)%20(%3FP%3Cfruit%3E.%2B%3F)%24&test_string=Joanna%20likes%20apples&ignorecase=0&multiline=0&dotall=0&verbose=0 https://pythex.org/?regex=%5E(%3FP%3Cuser%3E.%2B%3F)%20(like... 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.
- ezekg 9y agoI built a command line tool awhile back for doing things like this: https://github.com/ezekg/xo https://github.com/ezekg/xo You could do something like, echo 'Joanna likes apples' | xo '/^(\w+) (?:likes|prefers) (\w+)/{"user":"$1","fruit":"$2"}/i'
- jcazor 9y agoYou can read a getting started post here: https://medium.com/komlog/getting-started-with-komlog-24345af7b09b https://medium.com/komlog/getting-started-with-komlog-24345a...