Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Минимальная конфигурация для Томиты #8

Merged
merged 36 commits into from
Oct 6, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
ee5cee7
Create triangle-medians-point.txt
pinbraerts Sep 18, 2017
4a71081
Create triangle-bisectors-cross.txt
pinbraerts Sep 18, 2017
4a91c3d
Create triangle-medians-perpendicular-indexed.txt
pinbraerts Sep 18, 2017
6633b24
Create triangle-quadrangle-medians-cross-square
pinbraerts Sep 18, 2017
d4e5773
Create circle-chords-angle.txt
pinbraerts Sep 18, 2017
1081222
Create quadrangle-perpendicular-degrees.txt
pinbraerts Sep 18, 2017
e8df893
Create triangle-unnamed -destance-orthocenter.txt
pinbraerts Sep 18, 2017
57b0805
Create circle-tangent-cross-angle.txt
pinbraerts Sep 18, 2017
4999fd6
Create triangle-medians-indexed-respectively.txt
pinbraerts Sep 18, 2017
62009b3
Create triangle-medians-respectively-square.txt
pinbraerts Sep 18, 2017
8da8873
Rename triangle-unnamed -destance-orthocenter.txt to triangle-unnamed…
pinbraerts Sep 18, 2017
b4880a7
Create circle-opposite-multitask.txt
pinbraerts Sep 18, 2017
dec1696
Create triangle-least-incentre.txt
pinbraerts Sep 18, 2017
601c454
Create triangle-straight-centroid.txt
pinbraerts Sep 18, 2017
e25e380
Create triangle-medans-indexed-beyond.txt
pinbraerts Sep 18, 2017
1b2ae1d
Create triangle-centroid-unnamed-respectively.txt
pinbraerts Sep 18, 2017
1e2aff8
Переместил в test/data
pinbraerts Sep 18, 2017
a00c344
Добавил расширение
pinbraerts Sep 18, 2017
070c206
Create facttypes.proto
pinbraerts Sep 22, 2017
4912405
Rename tomita/facttypes.proto to extract/facttypes.proto
pinbraerts Sep 22, 2017
7b62ef3
Create config.proto
pinbraerts Sep 22, 2017
53624ba
Create Readme.md
pinbraerts Sep 22, 2017
a2fa75f
Update Readme.md
pinbraerts Sep 22, 2017
8c2ff8a
Merge remote-tracking branch 'refs/remotes/MCL1303/master'
pinbraerts Sep 22, 2017
5f2c032
Добавил конфигурацию tomita.
pinbraerts Sep 23, 2017
242fde1
Update extract
pinbraerts Sep 29, 2017
5fc123e
Поменял extract, сэмулировав запуск томиты на телефоне (ничего не дел…
pinbraerts Oct 5, 2017
d081315
Забыл сделать add для extract
pinbraerts Oct 5, 2017
7311bea
Удалил не код
pinbraerts Oct 5, 2017
a59e084
Удалил pretty output
pinbraerts Oct 5, 2017
938b4a2
Убрал не код
pinbraerts Oct 3, 2017
91c99ad
Заменил табы на пробелы
pinbraerts Oct 3, 2017
a1b5f1a
Revert "Заменил табы на пробелы"
pinbraerts Oct 5, 2017
044ebea
Косметические изменения
pinbraerts Oct 5, 2017
4633ca1
Заменил слэши
pinbraerts Oct 5, 2017
d67396e
Update Readme.md
pinbraerts Oct 5, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.bin
test/data/output/*.xml
5 changes: 5 additions & 0 deletions extract/Point.cxx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#encoding "utf-8"

PointName -> AnyWord<wff=/[A-Z]/>;

Point -> "точка" PointName interp(Point.Name);
3 changes: 3 additions & 0 deletions extract/Readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
To get facts from file in `test/data/input` run `extract $file` (on UNIX run `./extract $file`) in **this** directory.

`tomitaparser` **have to be** in PATH (`/usr/bin`)
19 changes: 19 additions & 0 deletions extract/config.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
encoding "utf-8";

TTextMinerConfig {
Dictionary = "mydic.gzt";

PrettyOutput = "pr.html";

Articles = [
{ Name = "точка" }
]

Facts = [
{ Name = "Point" }
]

Output = {
Format = xml;
}
}
1 change: 1 addition & 0 deletions extract/extract
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
tomitaparser config.proto < ../test/data/input/$1 > ../test/data/output/$(basename $1 .txt).xml
3 changes: 3 additions & 0 deletions extract/extract.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@echo off

tomitaparser config.proto < ..\test\data\input\%1 > ..\test\data\output\%~n1.xml
6 changes: 6 additions & 0 deletions extract/facttypes.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import "base.proto";
import "facttypes_base.proto";

message Point : NFactType.TFact {
optional string Name = 1;
}
9 changes: 9 additions & 0 deletions extract/mydic.gzt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
encoding "utf-8";

import "base.proto";
import "articles_base.proto";
import "Facttypes.proto";

TAuxDicArticle "точка" {
key = { "tomita:Point.cxx" type=CUSTOM }
}