Coder Social home page Coder Social logo

tulamili / app-chartimes Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 36 KB

Provides and administers MetaCPAN's App::App-chartimes. This module provides a UNIX-like command `chartimes'. (The frequency of lines sorted out by the each frequency number of each character will be shown in a matrix like form.))

Home Page: https://metacpan.org/dist/App-chartimes

Perl 100.00%

app-chartimes's Introduction

This module provides a Unix-like command `chartimes'.

各文字iをj個持つ行が、入力全体にいくつ発生したか(c(i,j))を 行列状に表示するコマンド chartimes を提供するCPANモジュールである。

下記の用途に使える。他にも幅広い用途に使えるであろう。

  • どんな文字が使われたかが一覧できるので、特別値や特殊文字の発見も容易である。

  • 小数点が2回以上を持つ数値であるべきデータの検出が確実に可能。 ピリオドに対応する出力行において、j=1でなくて2以上の箇所に非0が出現するため。

  • 括弧の対応が取れていないデータの検出もある程度容易に可能。 「(」と「)」の個数が異なる行が存在すれば、食い違いが出力に現れ易いため。

  • 使われた文字の種類が多い場合には、各文字iにおいて c(i,j) > 0 となる j の 最大値の下限値をオプション(-y Nの形)で指定することで、出力行数を低減可能。

  • 各文字iが、入力全体の各行lにおいて、連続して繰り返し発生した場合の最大長 r(i,l) =: j と考えて、あらゆる(i,j)に対して該当する行数を計数する オプション(-R)も提供している。このことで、キーボード連打等もしくは通信の 不具合によるデータの異常を検出しやすくしている。

実行例を以下に示す(データはTRC新刊図書オープンデータを用いた)。コマンドラインで3回実行している:

(1) ISBN番号で、0,1,5の3文字がそれぞれ4個連続して出現する入力行が見つかった。(-Rのオプションで連続する最大長を算出している。)

(2) 半角空白,「ル」,「ー」(カタカナの長母音)のそれぞれが最大3個も出現する入力行が見つかった。

(3) 出現した文字が全て分かるし、各行に最大1回しか出現しない文字(0,4,5,7,c,m,x)も分かるので、書式も推定できる。

image

Copyright (c) 2024 Toshiyuki SHIMONO. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

app-chartimes's People

Contributors

tulamili avatar

Watchers

 avatar

app-chartimes's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.