<commit_before>/// <reference path="../typings/tsd.d.ts"/>

import Router from 'koa-router'
import CommonHeader from '../models/CommonHeader';

import CommonParser from "../utils/CommonParser";
import NateParser from "../utils/NateParser";
import paramNaver from "../models/params/NaverParam";
import paramDaum from "../models/params/DaumParam";

let parser = new CommonParser();

/* GET home page. */
router.get('/naver', (ctx, next) => {
  parser.setParam(paramNaver)
  ctx.body = await parser.getRank()
})

router.get('/daum', (ctx, next) => {
  parser.setParam(paramDaum)
  ctx.body = await parser.getRank()
})

router.get('/nate', (ctx, next) => {
  ctx.body = await Nateparser.getNateRank()
})

export default router;<commit_msg>Update rank.ts<commit_after>/// <reference path="../typings/tsd.d.ts"/>

import Router from 'koa-router'

import CommonParser from "../utils/CommonParser";
import NateParser from "../utils/NateParser";
import paramNaver from "../models/params/NaverParam";
import paramDaum from "../models/params/DaumParam";
let parser = new CommonParser();

const router = new Router({ prefix: '/rank'})


/* GET home page. */

router.get('/naver', (ctx, next) => {
  parser.setParam(paramNaver)
  ctx.body = await parser.getRank()
})

router.get('/daum', (ctx, next) => {
  parser.setParam(paramDaum)
  ctx.body = await parser.getRank()
})

router.get('/nate', (ctx, next) => {
  ctx.body = await Nateparser.getNateRank()
})

export default router;
{'fraction_non_alphanumeric': 0.18051771117166213, 'fraction_numerical': 0.0, 'mean_word_length': 4.227758007117438, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '454102', 'n_tokens_mistral': 485, 'n_tokens_neox': 478, 'n_words': 116}