clojure-europe

For people in Europe... or elsewhere... UGT https://indieweb.org/Universal_Greeting_Time
simongray 2021-04-04T06:31:39.025Z

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

👍 2
orestis 2021-04-04T16:55:48.027Z

Why? I mean what’s the reason to use a different regex engine?

orestis 2021-04-04T16:56:23.027700Z

Oh it’s not regex at all. I got confused. Sorry!

simongray 2021-04-05T08:26:28.028400Z

Yup, it's a DSL for matching against dependency grammar.

simongray 2021-04-05T08:27:20.028600Z

While regex matches characters in strings, this matches grammar and other kinds of language data.

simongray 2021-04-05T08:28:37.028800Z

Within a directed graph of nodes (words) related by grammatical relations.

reefersleep 2021-04-06T22:16:54.063Z

That’s sounds pretty cool!

reefersleep 2021-04-06T22:17:27.063200Z

Are there examples of interesting usages?

simongray 2021-04-07T06:48:11.064300Z

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

simongray 2021-04-07T06:50:08.064600Z

I am thinking about making another DSL on top of it since I actually kinda dislike using text-based DSLs in Clojure 😆

simongray 2021-04-07T06:50:36.064800Z

since it is matching against nodes in a directed graph it should be possible to represent it using Datomic-style triples

simongray 2021-04-07T06:52:57.065Z

I want to use it for building patterns to detect various Chinese sentence patterns

simongray 2021-04-07T06:56:56.065700Z

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

reefersleep 2021-04-07T12:19:08.071Z

💪

simongray 2021-04-04T06:31:46.025400Z

(and good morning)

2021-04-04T16:26:21.026400Z

Morning