Skip to content

Commit

Permalink
Merge pull request #10 from YujiSODE/branchY20170323
Browse files Browse the repository at this point in the history
Branch y20170323
  • Loading branch information
YujiSODE authored Mar 23, 2017
2 parents cd47ea9 + bebca27 commit 010e956
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ https://github.com/YujiSODE/txtStat
______

Function`txtStat(FLG95)`loads text data and make a graph of frequency against the Unicode codepoints,
and returns function that returns character analysis result.
and returns function that returns [character analysis result](#character-analysis-result).

## Script
* `txtStat.js`

## How to use
1. To activate interface:`var y=txtStat();`
2. To get character analysis result:`y();`
An object is returned as a result.
An [object](#character-analysis-result) is returned as a result.

## Interface
1. __Textarea:__ a text input for analysis.
Expand All @@ -26,7 +26,7 @@ and returns function that returns character analysis result.
3. __Load__ button; it loads text data in "__Textarea__" as a set of data.

4. __Analyze__ button; it analyzes all loaded text datasets and make a graph of frequency against the Unicode
codepoints on canvas tag. _Optionally another canvas tag is also available to output_.
codepoints on canvas tag. [_Optionally another canvas tag is also available to output_](#optional-settings).

5. __Clear textarea__ button; it clears only "__Textarea__".

Expand All @@ -35,7 +35,7 @@ and returns function that returns character analysis result.
7. __Close__ button; it closes this interface.

## Character analysis result
This is an object returned by a function, which returned by function`txtStat()`.
This is an object returned by a function, which is returned by function`txtStat(FLG95)`.
This object has 9 values
1. `data`: JSON formatted loaded data with a value`N`indicating a cumulative frequency of text datasets.

Expand All @@ -51,7 +51,7 @@ This object has 9 values
4. `log`: a timestamp.

5. `xMax`: the max Unicode codepoint value in loaded text datasets.
This is an object with 4 values\(`x`,`x16`,`char`, and`xMaxFreq`; see`xMin`\).
This is an object with 4 values\(`x`,`x16`,`char`, and`xMaxFreq`; _see 6_\.`xMin`\).

6. `xMin`: the min Unicode codepoint value in loaded text datasets.
`xMax`and`xMin` are objects with 4 values.
Expand All @@ -68,9 +68,11 @@ This object has 9 values

## Optional settings
* __Setting of function`txtStat(FLG95)`__
`FLG95`: [optional] true | false; 95% of canvas width is shown when `FLG95`= true
`FLG95`: true | false; 95% of canvas width is shown when `FLG95`= true

* __Setting of another canvas tag to output__
A valid id of another canvas tag can be input when __Analyze__ button is clicked.
[Character analysis result](#character-analysis-result) is overwritten by result of another canvas tag when input id is valid.

* __Setting of change canvas width__

* __Setting of canvas width__
Width of another canvas tag can be changed when input id is valid.

0 comments on commit 010e956

Please sign in to comment.