This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-04-04
Channels
- # babashka (3)
- # beginners (103)
- # calva (2)
- # cljs-dev (4)
- # clojure (23)
- # clojure-europe (16)
- # clojure-germany (1)
- # clojuredesign-podcast (2)
- # clojurescript (5)
- # cursive (4)
- # datahike (1)
- # datascript (1)
- # depstar (13)
- # fulcro (5)
- # inf-clojure (18)
- # lsp (37)
- # meander (2)
- # nrepl (2)
- # off-topic (12)
- # releases (2)
- # rewrite-clj (2)
- # shadow-cljs (9)
- # tools-deps (26)
I managed to basically completely replicate the Clojure regex functions while wrapping Stanford’s Semgrex DSL, since the Java classes underneath themselves mimic the Java regex classes. Pretty fun exercise! https://github.com/simongray/datalinguist/blob/master/src/dk/simongray/datalinguist/dependency.clj#L295-L349
While regex matches characters in strings, this matches grammar and other kinds of language data.
That’s sounds pretty cool!
Are there examples of interesting usages?
Not really interesting usages, but there are a few examples in the rich comment block https://github.com/simongray/datalinguist/blob/master/src/dk/simongray/datalinguist/dependency.clj#L351-L376
I am thinking about making another DSL on top of it since I actually kinda dislike using text-based DSLs in Clojure 😆
since it is matching against nodes in a directed graph it should be possible to represent it using Datomic-style triples
I actually made my own Java API for doing the same stuff years ago, not knowing CoreNLP included such a feature already… https://github.com/simongray/StatementAnnotator/tree/master/src/main/java/statements/patterns