Very cool, thanks Tim -----Original Message----- From: Miller, Timothy [mailto:timothy.mil...@childrens.harvard.edu] Sent: Tuesday, January 26, 2016 2:59 PM To: dev@ctakes.apache.org Subject: umls graph api
I've been working on some code for easy querying of the UMLS relation graph that I think might be useful in ctakes. The repo is here: https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_tmills_umls-2Dgraph-2Dapi&d=BQIFAg&c=qS4goWBT7poplM69zy_3xhKwEW14JZMSdioCoppxeFU&r=fs67GvlGZstTpyIisCYNYmQCP6r0bcpKGd4f7d4gTao&m=Nhcsz3GtrcQR0eMVCOiN6D4EV4bNJLT8aCIjiX0A5Jw&s=-qCcjEC3A1say2LAZQ59sjZRQZGOyqthGVvuOaX3IHY&e= If you point it at your umls download you can build the db in about 5 minutes (45 MB). Then the API has a class GraphFunctions with the following methods: public static List<String> getHypernyms(String cui); public static List<String> getHyponyms(String cui); public static boolean isa(String cui1, String cui2); These make use of just the "isa" relation in the MRREL file, and could tell you, for example, that isa("C0007102", "C3662248") is true (colon cancer is a finding) but that isa("C3662248", "C0007102") is not true. If people find it useful enough we may wish to add it to ctakes and perhaps we could redistribute this view of the UMLS subject to the same username checking we do now for the dictionary. We may wish to include other relations and ontologies as well -- right now just SNOMED. But this is the skeleton and I think with this starting point adding new capabilities will be pretty easy. Tim