Skip to content

Instantly share code, notes, and snippets.

View shuntaroy's full-sized avatar

Shuntaro Yada shuntaroy

View GitHub Profile
@shuntaroy
shuntaroy / gamma_index.py
Created March 29, 2022 11:37
Naive implementations of some classical, information theoretic keyword extraction methods
"""Gamma Index.
Zhou and Slater 2002"""
from typing import List
import numpy as np
import sigma_index as s
# slightly modified from:
# @Kta-M リズムに乗ってズンドコキヨシ♪ with Ruby
# https://qiita.com/Kta-M/items/c5ea66ddd0e4123a298c
def zundoko
l = 1
loop do
n = rand(32)
s = ("%05b" % n).gsub(/0/, 'ズン').gsub(/1/, 'ドコ')
r = [0, 1.0, 0, 0.5, 0, 0.5, 0, 0.5, 0.25, 0.25]
@shuntaroy
shuntaroy / cleveref_ja.sty
Last active January 31, 2024 21:03
cleveref 和文論文向け設定
\usepackage[noabbrev]{cleveref}
\crefformat{chapter}{第#2#1#3章}
\crefformat{section}{#2#1#3節}
\crefformat{subsection}{#2#1#3節}
\crefname{figure}{図}{図}
\crefname{table}{表}{表}
\crefname{equation}{式}{式}
\crefname{appendix}{付録}{付録}
\newcommand{\crefrangeconjunction}{--}
\newcommand{\crefpairconjunction}{, }