Medical Subject Headings Translation Workflow
Please see the Wiki for details of this project.
Codacy status
Medical Subject Headings (MeSH) Translation Workflow
Home Page: https://github.com/filak/MTW-MeSH/wiki
License: MIT License
Medical Subject Headings Translation Workflow
Please see the Wiki for details of this project.
Codacy status
Target for the MeSH 2025 version.
TBD:
Use trans_only_YYYY_extended.txt
DescriptorUI | ConceptUI | Language | Term Type | String | TermUI | ScopeNote | Tree | Created | Relation | ParentCUI
Do not use the TermUI - generate UUID v4 instead
Version 1.3.3
Fix export query: lookups_notes.sparql
?c meshv:scopeNote ?scn =>
OPTIONAL { ?c meshv:scopeNote ?scn }
MTW-MeSH/flask-app/application/utils.py
Line 696 in 211dcff
According to https://loc.gov/marc/bibliographic/bd005.html
16 chars length:
yyyymmddhhmmss.f
It shall return 404 instead.
Query template to fix:
lookups_use_instead
Ie.
https://id.nlm.nih.gov/mesh/D001769Q000201.html
https://id.nlm.nih.gov/mesh/D004798Q000097.html
Test query:
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX meshv: <http://id.nlm.nih.gov/mesh/vocab#>
PREFIX mesh: <http://id.nlm.nih.gov/mesh/>
PREFIX text: <http://jena.apache.org/text#>
PREFIX meshx: <http://mesh.medvik.cz/link/>
PREFIX mesht: <http://www.medvik.cz/schema/mesh/vocab/#>
#SELECT ?dui (GROUP_CONCAT(DISTINCT ?o ; separator='|') AS ?qn)
SELECT *
WHERE {
BIND(mesh:D001769 as ?d)
?dq meshv:hasDescriptor ?d .
#?dq meshv:active ?active .
#FILTER(?active)
?d meshv:identifier ?dui .
?dq meshv:useInstead ?ud .
#?dq meshv:hasQualifier ?q .
#?q meshv:identifier ?qui .
#?ud meshv:identifier ?udui .
#BIND( CONCAT(STR(?qui), '~', STR(?udui)) AS ?o)
}
#GROUP BY ?dui
LIMIT 100
https://flask-caching.readthedocs.io/en/latest/
Ie.:
SESSION_TYPE
SESSION_COOKIE_NAME
SESSION_COOKIE_HTTPONLY
SESSION_COOKIE_SECURE
SESSION_KEY_PREFIX
...
Config usage in mtw.ini as:
SESSIONS = {"SESSION_TYPE": "filesystem", ... }
It has been removed as being dedundant to xtr_en and xtr_cs fields
Store all the trx terms in a db table
/* terms */
--drop table if exists terms;
create table audit (
id integer primary key autoincrement,
dui text not null, -- DescriptorUI | QualifierUI
cui text not null, -- ConceptUI
term text not null,
created text DEFAULT (strftime('%Y-%m-%dT%H:%M:%S','now', 'localtime'))
);
Analyze how to:
If duplicate is found issue a danger alert - including created + dui + link .../search/dui:
pymemcache==3.5.2
Ie.
if app.config.get('CACHE_TYPE') == 'MemcachedCache':
memhost = app.config.get('CACHE_MEMCACHED_SERVERS',['127.0.0.1:11211'])[0]
try:
memclient = PMClient(memhost, ignore_exc=True, connect_timeout=3, timeout=3)
memclient.set('test_alive_key', 'ALIVE')
except:
err = '\n\nMemcached instance NOT running ! ' + str(memhost) + ' \n'
app.logger.error(err)
warn = '\n\nSetting CACHE_TYPE to Flask-Caching : FileSystemCache \n'
app.logger.warning(warn)
app.config.update({"CACHE_TYPE": "FileSystemCache"})
CACHE_DIR = mtu.get_instance_dir(app, app.config.get('CACHE_DIR','cache_fs'))
app.config.update({'CACHE_DIR': CACHE_DIR})
Missing params in sparql.updateTriple(... dui=dui, cache=cache)
Broken in version 1.6.0
https://github.com/filak/MTW-MeSH/blob/master/flask-app/instance/conf/mesh.ttl
@prefix mesh: <http://id.nlm.nih.gov/mesh/> .
geo, publ & check tags
MESH_RDF = https://id.nlm.nih.gov/mesh/sparql
Ie. check
MTW-MeSH/flask-app/application/utils.py
Line 827 in 54f3275
https://meshb.nlm.nih.gov/record/ui?ui=...
Try to use propLists
https://jena.apache.org/documentation/query/text-query.html#lists-of-indexed-properties
text:propLists (
[ text:propListProp mesht:defQuery ;
text:props (
rdfs:label
meshv:identifier
meshv:prefLabel
meshv:altLabel
meshv:casn1_label
meshv:registryNumber
meshv:relatedRegistryNumber
mesht:identifier
mesht:prefLabel
mesht:altLabel
mesht:casn1_label
) ;
]
[ text:propListProp mesht:includeNotes ;
text:props (
rdfs:label
meshv:identifier
meshv:prefLabel
meshv:altLabel
meshv:casn1_label
meshv:registryNumber
meshv:relatedRegistryNumber
mesht:identifier
mesht:prefLabel
mesht:altLabel
mesht:casn1_label
mesht:translatorsNote
mesht:annotation
mesht:historyNote
mesht:scopeNote
meshv:annotation
meshv:historyNote
meshv:note
meshv:onlineNote
meshv:publicMeSHNote
meshv:scopeNote
) ;
]
) ;
Add filter - checkbox - to the form (searchForm)
{% set prop_list = 'mesht:defQuery' %}
{% if includeNotes == 'yes' %}
{% set prop_list = 'mesht:includeNotes' %}
{% endif %}
{% if slang == 'target' %}
(?s ?score) text:query ({{ prop_list }} "{{ query }}" 500 "lang:{{ lang }}") .
{% elif slang == 'source' %}
(?s ?score) text:query ({{ prop_list }} "{{ query }}" 500 "lang:en") .
{% else %}
(?s ?score) text:query ({{ prop_list }} "{{ query }}" 500) .
{% endif %}
...
MTW version 1.3.2
It is necessary to fix handling obsolete terms and tree numbers in exports.
Ie.
https://id.nlm.nih.gov/mesh/M0016138
https://id.nlm.nih.gov/mesh/M0012696
TBD: enhance the query https://github.com/filak/MTW-MeSH/blob/master/flask-app/application/templates/sparql/descriptor.sparql
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.