Spaces:
Build error
Build error
freemt
commited on
Commit
·
09239dd
1
Parent(s):
6cbcdf3
Update
Browse files- docs/build/doctrees/environment.pickle +0 -0
- docs/build/doctrees/intro.doctree +0 -0
- docs/build/html/_sources/intro.rst.txt +3 -3
- docs/build/html/intro.html +18 -10
- docs/build/html/modules.html +6 -4
- docs/build/html/radiobee.html +42 -35
- docs/build/html/searchindex.js +1 -1
- docs/source/index.rst +0 -1
- docs/source/intro.rst +3 -3
- radiobee/gen_vector.py +5 -0
- radiobee/text2lists.py +1 -1
docs/build/doctrees/environment.pickle
CHANGED
Binary files a/docs/build/doctrees/environment.pickle and b/docs/build/doctrees/environment.pickle differ
|
|
docs/build/doctrees/intro.doctree
CHANGED
Binary files a/docs/build/doctrees/intro.doctree and b/docs/build/doctrees/intro.doctree differ
|
|
docs/build/html/_sources/intro.rst.txt
CHANGED
@@ -5,14 +5,14 @@ Introduction
|
|
5 |
|
6 |
The aim here was
|
7 |
|
8 |
-
The current implementation has been developed in Python 3 and
|
9 |
|
10 |
Motivation
|
11 |
**********
|
12 |
|
13 |
-
|
14 |
|
15 |
Limitations
|
16 |
***********
|
17 |
|
18 |
-
Currently, only zh-en/en-zh pairs are supported although further pairs
|
|
|
5 |
|
6 |
The aim here was
|
7 |
|
8 |
+
The current implementation has been developed in Python 3 and ``gradio``.
|
9 |
|
10 |
Motivation
|
11 |
**********
|
12 |
|
13 |
+
Aligned texts (paragraph-to-paragraph or sentence-to-sentence) can be used machine learning (e.g. machine translation), CAT (tmx, translation terms etc.) and education (dual-language ebook), etc.
|
14 |
|
15 |
Limitations
|
16 |
***********
|
17 |
|
18 |
+
Currently, only zh-en/en-zh pairs are supported although further pairs will be added if and when time permits. If you are willing to help with a particular pair (for example, de-zh, ja-zh, ru-zh, etc.), you are welcome to contact the developer.
|
docs/build/html/intro.html
CHANGED
@@ -17,7 +17,9 @@
|
|
17 |
<script src="_static/doctools.js"></script>
|
18 |
<script src="_static/js/theme.js"></script>
|
19 |
<link rel="index" title="Index" href="genindex.html" />
|
20 |
-
<link rel="search" title="Search" href="search.html" />
|
|
|
|
|
21 |
</head>
|
22 |
|
23 |
<body class="wy-body-for-nav">
|
@@ -35,15 +37,17 @@
|
|
35 |
</form>
|
36 |
</div>
|
37 |
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
|
38 |
-
|
39 |
-
|
40 |
-
<li><a class="reference internal" href="#">Introduction</a><ul>
|
41 |
-
<li><a class="reference internal" href="#motivation">Motivation</a></li>
|
42 |
-
<li><a class="reference internal" href="#limitations">Limitations</a></li>
|
43 |
</ul>
|
44 |
</li>
|
|
|
|
|
45 |
</ul>
|
46 |
-
|
47 |
</div>
|
48 |
</div>
|
49 |
</nav>
|
@@ -72,20 +76,24 @@
|
|
72 |
<h1>Introduction<a class="headerlink" href="#introduction" title="Permalink to this headline"></a></h1>
|
73 |
<p><code class="docutils literal notranslate"><span class="pre">radiobee</span></code> (<code class="docutils literal notranslate"><span class="pre">radiobee</span> <span class="pre">aligner</span></code>) is a powerful dualtext aligner.</p>
|
74 |
<p>The aim here was</p>
|
75 |
-
<p>The current implementation has been developed in Python 3 and <
|
76 |
<section id="motivation">
|
77 |
<h2>Motivation<a class="headerlink" href="#motivation" title="Permalink to this headline"></a></h2>
|
|
|
78 |
</section>
|
79 |
<section id="limitations">
|
80 |
<h2>Limitations<a class="headerlink" href="#limitations" title="Permalink to this headline"></a></h2>
|
81 |
-
<p>Currently, only zh-en/en-zh pairs are supported although further pairs
|
82 |
</section>
|
83 |
</section>
|
84 |
|
85 |
|
86 |
</div>
|
87 |
</div>
|
88 |
-
<footer>
|
|
|
|
|
|
|
89 |
|
90 |
<hr/>
|
91 |
|
|
|
17 |
<script src="_static/doctools.js"></script>
|
18 |
<script src="_static/js/theme.js"></script>
|
19 |
<link rel="index" title="Index" href="genindex.html" />
|
20 |
+
<link rel="search" title="Search" href="search.html" />
|
21 |
+
<link rel="next" title="radiobee package" href="radiobee.html" />
|
22 |
+
<link rel="prev" title="Welcome to radiobee’s documentation!" href="index.html" />
|
23 |
</head>
|
24 |
|
25 |
<body class="wy-body-for-nav">
|
|
|
37 |
</form>
|
38 |
</div>
|
39 |
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
|
40 |
+
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
|
41 |
+
<ul class="current">
|
42 |
+
<li class="toctree-l1 current"><a class="current reference internal" href="#">Introduction</a><ul>
|
43 |
+
<li class="toctree-l2"><a class="reference internal" href="#motivation">Motivation</a></li>
|
44 |
+
<li class="toctree-l2"><a class="reference internal" href="#limitations">Limitations</a></li>
|
45 |
</ul>
|
46 |
</li>
|
47 |
+
<li class="toctree-l1"><a class="reference internal" href="radiobee.html">radiobee package</a></li>
|
48 |
+
<li class="toctree-l1"><a class="reference internal" href="examples.html">Examples</a></li>
|
49 |
</ul>
|
50 |
+
|
51 |
</div>
|
52 |
</div>
|
53 |
</nav>
|
|
|
76 |
<h1>Introduction<a class="headerlink" href="#introduction" title="Permalink to this headline"></a></h1>
|
77 |
<p><code class="docutils literal notranslate"><span class="pre">radiobee</span></code> (<code class="docutils literal notranslate"><span class="pre">radiobee</span> <span class="pre">aligner</span></code>) is a powerful dualtext aligner.</p>
|
78 |
<p>The aim here was</p>
|
79 |
+
<p>The current implementation has been developed in Python 3 and <code class="docutils literal notranslate"><span class="pre">gradio</span></code>.</p>
|
80 |
<section id="motivation">
|
81 |
<h2>Motivation<a class="headerlink" href="#motivation" title="Permalink to this headline"></a></h2>
|
82 |
+
<p>Aligned texts (paragraph-to-paragraph or sentence-to-sentence) can be used machine learning (e.g. machine translation), CAT (tmx, translation terms etc.) and education (dual-language ebook), etc.</p>
|
83 |
</section>
|
84 |
<section id="limitations">
|
85 |
<h2>Limitations<a class="headerlink" href="#limitations" title="Permalink to this headline"></a></h2>
|
86 |
+
<p>Currently, only zh-en/en-zh pairs are supported although further pairs will be added if and when time permits. If you are willing to help with a particular pair (for example, de-zh, ja-zh, ru-zh, etc.), you are welcome to contact the developer.</p>
|
87 |
</section>
|
88 |
</section>
|
89 |
|
90 |
|
91 |
</div>
|
92 |
</div>
|
93 |
+
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
|
94 |
+
<a href="index.html" class="btn btn-neutral float-left" title="Welcome to radiobee’s documentation!" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
|
95 |
+
<a href="radiobee.html" class="btn btn-neutral float-right" title="radiobee package" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
|
96 |
+
</div>
|
97 |
|
98 |
<hr/>
|
99 |
|
docs/build/html/modules.html
CHANGED
@@ -35,11 +35,13 @@
|
|
35 |
</form>
|
36 |
</div>
|
37 |
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
|
38 |
-
|
39 |
-
|
40 |
-
<li><a class="reference internal" href="
|
|
|
|
|
41 |
</ul>
|
42 |
-
|
43 |
</div>
|
44 |
</div>
|
45 |
</nav>
|
|
|
35 |
</form>
|
36 |
</div>
|
37 |
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
|
38 |
+
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
|
39 |
+
<ul>
|
40 |
+
<li class="toctree-l1"><a class="reference internal" href="intro.html">Introduction</a></li>
|
41 |
+
<li class="toctree-l1"><a class="reference internal" href="radiobee.html">radiobee package</a></li>
|
42 |
+
<li class="toctree-l1"><a class="reference internal" href="examples.html">Examples</a></li>
|
43 |
</ul>
|
44 |
+
|
45 |
</div>
|
46 |
</div>
|
47 |
</nav>
|
docs/build/html/radiobee.html
CHANGED
@@ -17,7 +17,9 @@
|
|
17 |
<script src="_static/doctools.js"></script>
|
18 |
<script src="_static/js/theme.js"></script>
|
19 |
<link rel="index" title="Index" href="genindex.html" />
|
20 |
-
<link rel="search" title="Search" href="search.html" />
|
|
|
|
|
21 |
</head>
|
22 |
|
23 |
<body class="wy-body-for-nav">
|
@@ -35,42 +37,44 @@
|
|
35 |
</form>
|
36 |
</div>
|
37 |
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
|
38 |
-
|
39 |
-
|
40 |
-
<li><a class="reference internal" href="
|
41 |
-
<li><a class="reference internal" href="#
|
42 |
-
<li><a class="reference internal" href="#
|
43 |
-
<li><a class="reference internal" href="#radiobee-align-
|
44 |
-
<li><a class="reference internal" href="#radiobee-
|
45 |
-
<li><a class="reference internal" href="#radiobee-
|
46 |
-
<li><a class="reference internal" href="#radiobee-
|
47 |
-
<li><a class="reference internal" href="#radiobee-
|
48 |
-
<li><a class="reference internal" href="#radiobee-
|
49 |
-
<li><a class="reference internal" href="#radiobee-en2zh-
|
50 |
-
<li><a class="reference internal" href="#radiobee-
|
51 |
-
<li><a class="reference internal" href="#radiobee-
|
52 |
-
<li><a class="reference internal" href="#radiobee-
|
53 |
-
<li><a class="reference internal" href="#radiobee-gen-
|
54 |
-
<li><a class="reference internal" href="#radiobee-gen-
|
55 |
-
<li><a class="reference internal" href="#radiobee-gen-
|
56 |
-
<li><a class="reference internal" href="#radiobee-gen-
|
57 |
-
<li><a class="reference internal" href="#radiobee-
|
58 |
-
<li><a class="reference internal" href="#radiobee-
|
59 |
-
<li><a class="reference internal" href="#radiobee-
|
60 |
-
<li><a class="reference internal" href="#radiobee-
|
61 |
-
<li><a class="reference internal" href="#radiobee-
|
62 |
-
<li><a class="reference internal" href="#radiobee-
|
63 |
-
<li><a class="reference internal" href="#radiobee-plot-
|
64 |
-
<li><a class="reference internal" href="#radiobee-
|
65 |
-
<li><a class="reference internal" href="#radiobee-
|
66 |
-
<li><a class="reference internal" href="#radiobee-
|
67 |
-
<li><a class="reference internal" href="#radiobee-
|
68 |
-
<li><a class="reference internal" href="#radiobee-
|
69 |
-
<li><a class="reference internal" href="#module
|
|
|
70 |
</ul>
|
71 |
</li>
|
|
|
72 |
</ul>
|
73 |
-
|
74 |
</div>
|
75 |
</div>
|
76 |
</nav>
|
@@ -189,7 +193,10 @@
|
|
189 |
|
190 |
</div>
|
191 |
</div>
|
192 |
-
<footer>
|
|
|
|
|
|
|
193 |
|
194 |
<hr/>
|
195 |
|
|
|
17 |
<script src="_static/doctools.js"></script>
|
18 |
<script src="_static/js/theme.js"></script>
|
19 |
<link rel="index" title="Index" href="genindex.html" />
|
20 |
+
<link rel="search" title="Search" href="search.html" />
|
21 |
+
<link rel="next" title="Examples" href="examples.html" />
|
22 |
+
<link rel="prev" title="Introduction" href="intro.html" />
|
23 |
</head>
|
24 |
|
25 |
<body class="wy-body-for-nav">
|
|
|
37 |
</form>
|
38 |
</div>
|
39 |
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
|
40 |
+
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
|
41 |
+
<ul class="current">
|
42 |
+
<li class="toctree-l1"><a class="reference internal" href="intro.html">Introduction</a></li>
|
43 |
+
<li class="toctree-l1 current"><a class="current reference internal" href="#">radiobee package</a><ul>
|
44 |
+
<li class="toctree-l2"><a class="reference internal" href="#submodules">Submodules</a></li>
|
45 |
+
<li class="toctree-l2"><a class="reference internal" href="#radiobee-align-sents-module">radiobee.align_sents module</a></li>
|
46 |
+
<li class="toctree-l2"><a class="reference internal" href="#radiobee-align-texts-module">radiobee.align_texts module</a></li>
|
47 |
+
<li class="toctree-l2"><a class="reference internal" href="#radiobee-amend-avec-module">radiobee.amend_avec module</a></li>
|
48 |
+
<li class="toctree-l2"><a class="reference internal" href="#radiobee-app-module">radiobee.app module</a></li>
|
49 |
+
<li class="toctree-l2"><a class="reference internal" href="#radiobee-cmat2tset-module">radiobee.cmat2tset module</a></li>
|
50 |
+
<li class="toctree-l2"><a class="reference internal" href="#radiobee-docterm-scores-module">radiobee.docterm_scores module</a></li>
|
51 |
+
<li class="toctree-l2"><a class="reference internal" href="#radiobee-en2zh-module">radiobee.en2zh module</a></li>
|
52 |
+
<li class="toctree-l2"><a class="reference internal" href="#radiobee-en2zh-tokens-module">radiobee.en2zh_tokens module</a></li>
|
53 |
+
<li class="toctree-l2"><a class="reference internal" href="#radiobee-file2text-module">radiobee.file2text module</a></li>
|
54 |
+
<li class="toctree-l2"><a class="reference internal" href="#radiobee-files2df-module">radiobee.files2df module</a></li>
|
55 |
+
<li class="toctree-l2"><a class="reference internal" href="#radiobee-gen-aset-module">radiobee.gen_aset module</a></li>
|
56 |
+
<li class="toctree-l2"><a class="reference internal" href="#radiobee-gen-eps-minsamples-module">radiobee.gen_eps_minsamples module</a></li>
|
57 |
+
<li class="toctree-l2"><a class="reference internal" href="#radiobee-gen-model-module">radiobee.gen_model module</a></li>
|
58 |
+
<li class="toctree-l2"><a class="reference internal" href="#radiobee-gen-pset-module">radiobee.gen_pset module</a></li>
|
59 |
+
<li class="toctree-l2"><a class="reference internal" href="#radiobee-gen-row-alignment-module">radiobee.gen_row_alignment module</a></li>
|
60 |
+
<li class="toctree-l2"><a class="reference internal" href="#radiobee-insert-spaces-module">radiobee.insert_spaces module</a></li>
|
61 |
+
<li class="toctree-l2"><a class="reference internal" href="#radiobee-interpolate-pset-module">radiobee.interpolate_pset module</a></li>
|
62 |
+
<li class="toctree-l2"><a class="reference internal" href="#radiobee-lists2cmat-module">radiobee.lists2cmat module</a></li>
|
63 |
+
<li class="toctree-l2"><a class="reference internal" href="#radiobee-loadtext-module">radiobee.loadtext module</a></li>
|
64 |
+
<li class="toctree-l2"><a class="reference internal" href="#radiobee-mdx-e2c-module">radiobee.mdx_e2c module</a></li>
|
65 |
+
<li class="toctree-l2"><a class="reference internal" href="#radiobee-plot-cmat-module">radiobee.plot_cmat module</a></li>
|
66 |
+
<li class="toctree-l2"><a class="reference internal" href="#radiobee-plot-df-module">radiobee.plot_df module</a></li>
|
67 |
+
<li class="toctree-l2"><a class="reference internal" href="#radiobee-process-upload-module">radiobee.process_upload module</a></li>
|
68 |
+
<li class="toctree-l2"><a class="reference internal" href="#radiobee-seg-text-module">radiobee.seg_text module</a></li>
|
69 |
+
<li class="toctree-l2"><a class="reference internal" href="#radiobee-shuffle-sents-module">radiobee.shuffle_sents module</a></li>
|
70 |
+
<li class="toctree-l2"><a class="reference internal" href="#radiobee-smatrix-module">radiobee.smatrix module</a></li>
|
71 |
+
<li class="toctree-l2"><a class="reference internal" href="#radiobee-trim-df-module">radiobee.trim_df module</a></li>
|
72 |
+
<li class="toctree-l2"><a class="reference internal" href="#module-contents">Module contents</a></li>
|
73 |
</ul>
|
74 |
</li>
|
75 |
+
<li class="toctree-l1"><a class="reference internal" href="examples.html">Examples</a></li>
|
76 |
</ul>
|
77 |
+
|
78 |
</div>
|
79 |
</div>
|
80 |
</nav>
|
|
|
193 |
|
194 |
</div>
|
195 |
</div>
|
196 |
+
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
|
197 |
+
<a href="intro.html" class="btn btn-neutral float-left" title="Introduction" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
|
198 |
+
<a href="examples.html" class="btn btn-neutral float-right" title="Examples" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
|
199 |
+
</div>
|
200 |
|
201 |
<hr/>
|
202 |
|
docs/build/html/searchindex.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
Search.setIndex({docnames:["examples","index","intro","modules","radiobee"],envversion:{"sphinx.domains.c":2,"sphinx.domains.changeset":1,"sphinx.domains.citation":1,"sphinx.domains.cpp":4,"sphinx.domains.index":1,"sphinx.domains.javascript":2,"sphinx.domains.math":2,"sphinx.domains.python":3,"sphinx.domains.rst":2,"sphinx.domains.std":2,sphinx:56},filenames:["examples.rst","index.rst","intro.rst","modules.rst","radiobee.rst"],objects:{},objnames:{},objtypes:{},terms:{"3":2,As:0,For:0,If:2,The:2,aim:2,align:[0,2],align_s:[1,3],align_text:[1,3],although:2,amend_avec:[1,3],app:[1,3],ar:2,been:[0,2],
|
|
|
1 |
+
Search.setIndex({docnames:["examples","index","intro","modules","radiobee"],envversion:{"sphinx.domains.c":2,"sphinx.domains.changeset":1,"sphinx.domains.citation":1,"sphinx.domains.cpp":4,"sphinx.domains.index":1,"sphinx.domains.javascript":2,"sphinx.domains.math":2,"sphinx.domains.python":3,"sphinx.domains.rst":2,"sphinx.domains.std":2,sphinx:56},filenames:["examples.rst","index.rst","intro.rst","modules.rst","radiobee.rst"],objects:{},objnames:{},objtypes:{},terms:{"3":2,As:0,For:0,If:2,The:2,ad:2,aim:2,align:[0,2],align_s:[1,3],align_text:[1,3],although:2,amend_avec:[1,3],app:[1,3],ar:2,been:[0,2],can:2,cannot:0,cat:2,cmat2tset:[1,3],co:0,contact:2,content:3,current:2,de:2,develop:2,docterm_scor:[1,3],download:0,dual:2,dualtext:2,e:2,ebook:2,educ:2,en2zh:[1,3],en2zh_token:[1,3],en:2,etc:2,exampl:[1,2],file2text:[1,3],files2df:[1,3],further:2,g:2,gen_aset:[1,3],gen_eps_minsampl:[1,3],gen_model:[1,3],gen_pset:[1,3],gen_row_align:[1,3],gradio:2,ha:[0,2],help:2,here:2,http:0,huggingfac:0,implement:2,index:1,insert_spac:[1,3],instal:1,interpolate_pset:[1,3],introduct:1,ja:2,languag:2,learn:2,limit:1,lists2cmat:[1,3],loadtext:[1,3],machin:2,mdx_e2c:[1,3],method:0,mikee:0,modul:[1,3],motiv:1,now:0,onli:2,onlin:0,packag:[0,1,3],page:1,pair:2,paragraph:2,particular:2,permit:2,pip:0,plot_cmat:[1,3],plot_df:[1,3],power:2,process_upload:[1,3],publish:0,pypi:0,python:2,radiobe:[0,2],ru:2,search:1,seg_text:[1,3],sentenc:2,shuffle_s:[1,3],smatrix:[1,3],space:0,submodul:[1,3],suggest:0,support:2,term:2,text:2,time:2,tmx:2,translat:2,trim_df:[1,3],us:[0,2],usag:1,version:0,wa:2,welcom:2,when:2,willing:2,yet:0,you:2,zh:2,zip:0},titles:["Examples","Welcome to radiobee\u2019s documentation!","Introduction","radiobee","radiobee package"],titleterms:{align_s:4,align_text:4,amend_avec:4,app:4,cmat2tset:4,content:[1,4],docterm_scor:4,document:1,en2zh:4,en2zh_token:4,exampl:0,file2text:4,files2df:4,gen_aset:4,gen_eps_minsampl:4,gen_model:4,gen_pset:4,gen_row_align:4,indic:1,insert_spac:4,instal:0,interpolate_pset:4,introduct:2,limit:2,lists2cmat:4,loadtext:4,mdx_e2c:4,modul:4,motiv:2,packag:4,plot_cmat:4,plot_df:4,process_upload:4,radiobe:[1,3,4],s:1,seg_text:4,shuffle_s:4,smatrix:4,submodul:4,tabl:1,trim_df:4,usag:0,welcom:1}})
|
docs/source/index.rst
CHANGED
@@ -12,7 +12,6 @@ Welcome to radiobee's documentation!
|
|
12 |
|
13 |
intro
|
14 |
radiobee
|
15 |
-
modules
|
16 |
examples
|
17 |
|
18 |
Indices and tables
|
|
|
12 |
|
13 |
intro
|
14 |
radiobee
|
|
|
15 |
examples
|
16 |
|
17 |
Indices and tables
|
docs/source/intro.rst
CHANGED
@@ -5,14 +5,14 @@ Introduction
|
|
5 |
|
6 |
The aim here was
|
7 |
|
8 |
-
The current implementation has been developed in Python 3 and
|
9 |
|
10 |
Motivation
|
11 |
**********
|
12 |
|
13 |
-
|
14 |
|
15 |
Limitations
|
16 |
***********
|
17 |
|
18 |
-
Currently, only zh-en/en-zh pairs are supported although further pairs
|
|
|
5 |
|
6 |
The aim here was
|
7 |
|
8 |
+
The current implementation has been developed in Python 3 and ``gradio``.
|
9 |
|
10 |
Motivation
|
11 |
**********
|
12 |
|
13 |
+
Aligned texts (paragraph-to-paragraph or sentence-to-sentence) can be used machine learning (e.g. machine translation), CAT (tmx, translation terms etc.) and education (dual-language ebook), etc.
|
14 |
|
15 |
Limitations
|
16 |
***********
|
17 |
|
18 |
+
Currently, only zh-en/en-zh pairs are supported although further pairs will be added if and when time permits. If you are willing to help with a particular pair (for example, de-zh, ja-zh, ru-zh, etc.), you are welcome to contact the developer.
|
radiobee/gen_vector.py
CHANGED
@@ -13,6 +13,11 @@ def gen_vector(text: str, model: Vectorizer) -> List[float]:
|
|
13 |
|
14 |
Args:
|
15 |
text: string of Chinese chars or English words.
|
|
|
|
|
|
|
|
|
|
|
16 |
"""
|
17 |
vec = insert_spaces(text).split()
|
18 |
|
|
|
13 |
|
14 |
Args:
|
15 |
text: string of Chinese chars or English words.
|
16 |
+
|
17 |
+
filename = r"data\test-dual.txt"
|
18 |
+
text = loadtext(filename)
|
19 |
+
list1, list2 = zip(*text2lists(text))
|
20 |
+
model = gen_model(list1)
|
21 |
"""
|
22 |
vec = insert_spaces(text).split()
|
23 |
|
radiobee/text2lists.py
CHANGED
@@ -19,7 +19,7 @@ def text2lists(text: Union[Iterable[str], str]) -> List[Tuple[str, str]]:
|
|
19 |
fastlid.set_languages = set_languages
|
20 |
list1 = []
|
21 |
list2 = [] # for determining en-zh or zh-en
|
22 |
-
lang0 = fastlid(text[:15000])
|
23 |
res = ""
|
24 |
left = False # start with left list1
|
25 |
|
|
|
19 |
fastlid.set_languages = set_languages
|
20 |
list1 = []
|
21 |
list2 = [] # for determining en-zh or zh-en
|
22 |
+
lang0, _ = fastlid(text[:15000])
|
23 |
res = ""
|
24 |
left = False # start with left list1
|
25 |
|