Skip to content

Instantly share code, notes, and snippets.

View yaskevich's full-sized avatar

Alyaxey Yaskevich yaskevich

View GitHub Profile
from flask import Flask
from flask import make_response
from flask import jsonify
from flask import Flask, render_template
from flask import Flask, request, send_from_directory
# apt install python3-enchant
import enchant
d = enchant.Dict("en_US")
@yaskevich
yaskevich / description.md
Last active August 26, 2019 16:17
GSOC 2019, UD Annotatatrix project

GSOC 2019, UD Annotatatrix project

web application for annotating syntactic corpora (treebanks)

:octocat:

My commits till the end of July are already displayed in the official repository of the project.

August work is waiting for merge via this pull request.

Full list of my commits is currently accesible here – all the commits to the project made after April 9, 2019 are mine.

@yaskevich
yaskevich / enum-dates.py
Last active February 28, 2019 10:20
enumerate dates in Python
from datetime import timedelta, date
a = date(2018,12,24)
b = date(2015,7,1)
for d in range((a-b).days):
dt = a - timedelta(days=d)
print(dt)
binom.test(x = 1, n = 1000000, p = 0)
verses <-read.csv("https://raw.githubusercontent.com/LingData2019/LingData/master/data/poetry_last_in_lines.csv", sep="\t", encoding = "UTF-8")
str(verses)
frqd <-read.csv("https://raw.githubusercontent.com/LingData2019/LingData/master/data/freq_rnc_ranked.csv", sep="\t", encoding = "UTF-8")
str(frqd)
verb = frqd[frqd$PoS == "v",]
verses$UPoS
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
import requests
data = 'Your doctor will conduct a physical exam, look for signs and symptoms of influenza, and possibly order a test that detects influenza viruses.'
headers = {}
url = 'http://255.255.255.255:80/?properties={"annotators":"tokenize,ssplit,lemma,parse","outputFormat":"json"}'
r = requests.post(url, data=data, headers=headers)
sents = json.loads(r.content.decode("utf-8"))