Spaces:
Build error
Build error
freemt
commited on
Commit
Β·
f4cdef5
1
Parent(s):
4666df2
Update docs
Browse files
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
@@ -3,14 +3,14 @@ Introduction
|
|
3 |
|
4 |
``radiobee`` (or ``radiobee aligner`` in full) is a powerful dualtext aligner.
|
5 |
|
6 |
-
The aim here was to provide an interface to
|
7 |
|
8 |
The current implementation has been developed in Python 3 and ``gradio``.
|
9 |
|
10 |
Motivation
|
11 |
**********
|
12 |
|
13 |
-
|
14 |
|
15 |
Limitations
|
16 |
***********
|
|
|
3 |
|
4 |
``radiobee`` (or ``radiobee aligner`` in full) is a powerful dualtext aligner.
|
5 |
|
6 |
+
The aim here was to provide an interface to align two texts.
|
7 |
|
8 |
The current implementation has been developed in Python 3 and ``gradio``.
|
9 |
|
10 |
Motivation
|
11 |
**********
|
12 |
|
13 |
+
Properly aligned texts (paragraph-to-paragraph or sentence-to-sentence) find applications in machine learning (e.g. machine translation), CAT (tmx, translation terms etc.) and education (dual-language ebook), etc.
|
14 |
|
15 |
Limitations
|
16 |
***********
|
docs/build/html/intro.html
CHANGED
@@ -77,11 +77,11 @@
|
|
77 |
<section id="introduction">
|
78 |
<h1>Introduction<a class="headerlink" href="#introduction" title="Permalink to this headline">ο</a></h1>
|
79 |
<p><code class="docutils literal notranslate"><span class="pre">radiobee</span></code> (or <code class="docutils literal notranslate"><span class="pre">radiobee</span> <span class="pre">aligner</span></code> in full) is a powerful dualtext aligner.</p>
|
80 |
-
<p>The aim here was to provide an interface to
|
81 |
<p>The current implementation has been developed in Python 3 and <code class="docutils literal notranslate"><span class="pre">gradio</span></code>.</p>
|
82 |
<section id="motivation">
|
83 |
<h2>Motivation<a class="headerlink" href="#motivation" title="Permalink to this headline">ο</a></h2>
|
84 |
-
<p>
|
85 |
</section>
|
86 |
<section id="limitations">
|
87 |
<h2>Limitations<a class="headerlink" href="#limitations" title="Permalink to this headline">ο</a></h2>
|
|
|
77 |
<section id="introduction">
|
78 |
<h1>Introduction<a class="headerlink" href="#introduction" title="Permalink to this headline">ο</a></h1>
|
79 |
<p><code class="docutils literal notranslate"><span class="pre">radiobee</span></code> (or <code class="docutils literal notranslate"><span class="pre">radiobee</span> <span class="pre">aligner</span></code> in full) is a powerful dualtext aligner.</p>
|
80 |
+
<p>The aim here was to provide an interface to align two texts.</p>
|
81 |
<p>The current implementation has been developed in Python 3 and <code class="docutils literal notranslate"><span class="pre">gradio</span></code>.</p>
|
82 |
<section id="motivation">
|
83 |
<h2>Motivation<a class="headerlink" href="#motivation" title="Permalink to this headline">ο</a></h2>
|
84 |
+
<p>Properly aligned texts (paragraph-to-paragraph or sentence-to-sentence) find applications in machine learning (e.g. machine translation), CAT (tmx, translation terms etc.) and education (dual-language ebook), etc.</p>
|
85 |
</section>
|
86 |
<section id="limitations">
|
87 |
<h2>Limitations<a class="headerlink" href="#limitations" title="Permalink to this headline">ο</a></h2>
|
docs/build/html/searchindex.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
Search.setIndex({docnames:["examples","index","intro","modules","radiobee","userguide","userguide-zh"],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","userguide.rst","userguide-zh.rst"],objects:{},objnames:{},objtypes:{},terms:{"12":[5,6],"3":2,"316287378":[5,6],"4":[5,6],"8":[5,6],"\u4e00\u822c\u65e0\u9700\u7406\u4f1a\u8fd9\u4e9b\u53c2\u6570":6,"\u4e86\u89e3\u8fd9\u4e9b\u5bf9\u9f50\u5de5\u5177":6,"\u4ee5\u540e\u53ef\u80fd\u4f1a\u652f\u6301":6,"\u4f18\u8d28\u5bf9":6,"\u4f7f\u7528\u8bf4\u660e":1,"\u53e6\u4e00\u65b9\u9762":6,"\u53ef\u4ee5\u4ee5\u540e\u4f1a\u652f\u6301":[],"\u53ef\u4ee5\u53f3\u51fb\u62f7\u51fa\u56fe\u7684\u94fe\u63a5\u7528\u6d4f\u89c8\u5668\u72ec\u7acb\u8bbf\u95ee\u62f7\u51fa\u6765\u7684\u94fe\u63a5\u6216\u53f3\u51fb\u5b58\u76d8\u518d\u7528\u770b\u56fe\u7a0b\u5e8f\u6253\u5f00\u5b58\u76d8\u7684\u56fe\u6587\u4ef6":6,"\u548c":6,"\u5acc\u56fe\u592a\u5c0f\u7684\u8bdd":6,"\u5b58\u4e0b\u6709\u5173\u53c2\u6570\u67e5\u770b\u6216\u901a\u77e5\u5f00\u53d1\u8005":6,"\u662f":6,"\u6700\u5c0f":6,"\u7684\u5b6a\u751f\u5144\u5f1f":6,"\u7684\u5efa\u8bae\u503c":6,"\u76ee\u524d\u4ec5\u652f\u6301\u4e2d\u82f1":6,"\u76ee\u524d\u4ec5\u652f\u6301\u7eaf\u6587\u672c\u6587\u4ef6\u4e0a\u8f7d":6,"\u7b2c\u4e8c\u6b21\u4e0a\u8f7d\u6587\u4ef6\u524d\u8bf7\u70b9\u51fb":6,"\u7b49":6,"\u7b49\u683c\u5f0f":6,"\u82f1\u4e2d\u5bf9\u9f50":6,"\u8bbe\u5927\u4e9b\u5219\u4f1a\u5f97\u5230\u5c11\u4e00\u4e9b\u5bf9\u9f50\u5bf9\u56e0\u4e3a\u53ef\u80fd\u9519\u5931\u4e86\u4e00\u4e9b":6,"\u8bbe\u5927\u4e9b\u5219\u53ef\u80fd\u4f1a\u9519\u5931\u4e00\u4e9b":[],"\u8bbe\u5927\u4e9b\u6216":6,"\u8bbe\u5c0f\u4e9b\u53ef\u4ee5\u5f97\u5230\u66f4\u591a\u7684\u5bf9\u9f50\u5bf9\u4f46\u4e5f\u4f1a":[],"\u8bbe\u5c0f\u4e9b\u53ef\u4ee5\u5f97\u5230\u66f4\u591a\u7684\u5bf9\u9f50\u5bf9\u4f46\u4e5f\u4f1a\u6709\u66f4\u591a":6,"\u8bbe\u5c0f\u4e9b\u6216":6,"\u8bef\u62a5\u5bf9":6,"\u8bf7\u52a0\u5165qq\u7fa4":6,"\u8fd0\u884c\u51fa\u9519\u65f6\u53ef\u4ee5\u70b9\u51fb":6,"\u9519\u8bef\u5224\u65ad\u4e3a\u5bf9\u9f50\u7684\u5bf9":6,"\u9519\u8bef\u5bf9":[],"do":5,"new":5,As:0,For:0,If:[2,5],On:5,The:2,To:5,about:5,ad:2,address:5,aim:2,align:[0,2,5,6],align_s:[1,3],align_text:[1,3],also:5,although:2,amend_avec:[1,3],an:2,app:[1,3],ar:[2,5],been:[0,2],better:5,browser:5,built:0,bumblebe:[5,6],can:
|
|
|
1 |
+
Search.setIndex({docnames:["examples","index","intro","modules","radiobee","userguide","userguide-zh"],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","userguide.rst","userguide-zh.rst"],objects:{},objnames:{},objtypes:{},terms:{"12":[5,6],"3":2,"316287378":[5,6],"4":[5,6],"8":[5,6],"\u4e00\u822c\u65e0\u9700\u7406\u4f1a\u8fd9\u4e9b\u53c2\u6570":6,"\u4e86\u89e3\u8fd9\u4e9b\u5bf9\u9f50\u5de5\u5177":6,"\u4ee5\u540e\u53ef\u80fd\u4f1a\u652f\u6301":6,"\u4f18\u8d28\u5bf9":6,"\u4f7f\u7528\u8bf4\u660e":1,"\u53e6\u4e00\u65b9\u9762":6,"\u53ef\u4ee5\u4ee5\u540e\u4f1a\u652f\u6301":[],"\u53ef\u4ee5\u53f3\u51fb\u62f7\u51fa\u56fe\u7684\u94fe\u63a5\u7528\u6d4f\u89c8\u5668\u72ec\u7acb\u8bbf\u95ee\u62f7\u51fa\u6765\u7684\u94fe\u63a5\u6216\u53f3\u51fb\u5b58\u76d8\u518d\u7528\u770b\u56fe\u7a0b\u5e8f\u6253\u5f00\u5b58\u76d8\u7684\u56fe\u6587\u4ef6":6,"\u548c":6,"\u5acc\u56fe\u592a\u5c0f\u7684\u8bdd":6,"\u5b58\u4e0b\u6709\u5173\u53c2\u6570\u67e5\u770b\u6216\u901a\u77e5\u5f00\u53d1\u8005":6,"\u662f":6,"\u6700\u5c0f":6,"\u7684\u5b6a\u751f\u5144\u5f1f":6,"\u7684\u5efa\u8bae\u503c":6,"\u76ee\u524d\u4ec5\u652f\u6301\u4e2d\u82f1":6,"\u76ee\u524d\u4ec5\u652f\u6301\u7eaf\u6587\u672c\u6587\u4ef6\u4e0a\u8f7d":6,"\u7b2c\u4e8c\u6b21\u4e0a\u8f7d\u6587\u4ef6\u524d\u8bf7\u70b9\u51fb":6,"\u7b49":6,"\u7b49\u683c\u5f0f":6,"\u82f1\u4e2d\u5bf9\u9f50":6,"\u8bbe\u5927\u4e9b\u5219\u4f1a\u5f97\u5230\u5c11\u4e00\u4e9b\u5bf9\u9f50\u5bf9\u56e0\u4e3a\u53ef\u80fd\u9519\u5931\u4e86\u4e00\u4e9b":6,"\u8bbe\u5927\u4e9b\u5219\u53ef\u80fd\u4f1a\u9519\u5931\u4e00\u4e9b":[],"\u8bbe\u5927\u4e9b\u6216":6,"\u8bbe\u5c0f\u4e9b\u53ef\u4ee5\u5f97\u5230\u66f4\u591a\u7684\u5bf9\u9f50\u5bf9\u4f46\u4e5f\u4f1a":[],"\u8bbe\u5c0f\u4e9b\u53ef\u4ee5\u5f97\u5230\u66f4\u591a\u7684\u5bf9\u9f50\u5bf9\u4f46\u4e5f\u4f1a\u6709\u66f4\u591a":6,"\u8bbe\u5c0f\u4e9b\u6216":6,"\u8bef\u62a5\u5bf9":6,"\u8bf7\u52a0\u5165qq\u7fa4":6,"\u8fd0\u884c\u51fa\u9519\u65f6\u53ef\u4ee5\u70b9\u51fb":6,"\u9519\u8bef\u5224\u65ad\u4e3a\u5bf9\u9f50\u7684\u5bf9":6,"\u9519\u8bef\u5bf9":[],"do":5,"new":5,As:0,For:0,If:[2,5],On:5,The:2,To:5,about:5,ad:2,address:5,aim:2,align:[0,2,5,6],align_s:[1,3],align_text:[1,3],also:5,although:2,amend_avec:[1,3],an:2,app:[1,3],applic:2,ar:[2,5],been:[0,2],better:5,browser:5,built:0,bumblebe:[5,6],can:5,candid:5,cannot:0,cat:2,clear:[5,6],click:[0,5],cmat2tset:[1,3],co:0,contact:2,content:3,copi:5,csv:[5,6],current:2,de:2,develop:[2,5],dl_type:[5,6],docterm_scor:[1,3],docx:[5,6],download:0,dual:2,dualtext:2,e:2,ebook:2,educ:2,en2zh:[1,3],en2zh_token:[1,3],en:2,epsilon:[5,6],esp:[5,6],etc:[2,5],exampl:[1,2],fals:5,file2text:[1,3],file:5,files2df:[1,3],find:2,first:5,flag:[5,6],format:5,full:2,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],go:5,good:5,gradio:2,group:5,ha:[0,2],hand:5,have:5,help:2,here:2,how:1,html:[5,6],http:0,huggingfac:0,identifi:5,idf_typ:[5,6],imag:5,implement:2,index:1,inform:5,insert_spac:[1,3],instal:1,interfac:2,interpolate_pset:[1,3],introduct:1,ja:2,join:5,just:0,know:5,languag:2,larger:5,later:5,learn:2,limit:1,lists2cmat:[1,3],loadtext:[1,3],look:5,machin:2,mai:5,md:[5,6],mdx_e2c:[1,3],method:0,mikee:0,min_sampl:[5,6],minimum:5,miss:5,modul:[1,3],more:5,motiv:1,need:5,norm:[5,6],normal:5,now:0,one:0,onli:2,onlin:0,open:5,other:5,output:5,packag:[0,1,3],page:1,pair:[2,5],paragraph:2,particular:2,pdf:[5,6],permit:2,pip:0,pleas:5,plot_cmat:[1,3],plot_df:[1,3],posit:5,power:2,process_upload:[1,3],properli:2,provid:2,publish:0,pure:5,pypi:0,python:2,qq:5,radiobe:[0,2,5,6],result:5,right:5,row:0,ru:2,save:5,search:1,seg_text:[1,3],select:5,sentenc:2,should:5,shuffle_s:[1,3],sibl:5,smaller:5,smatrix:[1,3],someth:5,space:0,srt:[5,6],submit:[0,5],submodul:[1,3],subsequ:5,suggest:[0,5],support:[2,5],tab:5,tabl:0,tend:5,term:2,testrun:0,text:[2,5],tf_type:[5,6],time:2,tmx:2,touch:5,translat:2,trim_df:[1,3],two:2,txt:[5,6],unless:5,upload:5,us:[0,1],usag:1,valu:5,version:0,wa:2,welcom:2,what:5,when:[2,5],willing:2,wrong:5,yet:0,you:[2,5],zh:2,zip:0},titles:["Examples","Welcome to radiobee\u2019s documentation!","Introduction","radiobee","radiobee package","How to use","\u4f7f\u7528\u8bf4\u660e"],titleterms:{"\u4f7f\u7528\u8bf4\u660e":6,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,how:5,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,us:5,usag:0,welcom:1}})
|
docs/source/intro.rst
CHANGED
@@ -3,14 +3,14 @@ Introduction
|
|
3 |
|
4 |
``radiobee`` (or ``radiobee aligner`` in full) is a powerful dualtext aligner.
|
5 |
|
6 |
-
The aim here was to provide an interface to
|
7 |
|
8 |
The current implementation has been developed in Python 3 and ``gradio``.
|
9 |
|
10 |
Motivation
|
11 |
**********
|
12 |
|
13 |
-
|
14 |
|
15 |
Limitations
|
16 |
***********
|
|
|
3 |
|
4 |
``radiobee`` (or ``radiobee aligner`` in full) is a powerful dualtext aligner.
|
5 |
|
6 |
+
The aim here was to provide an interface to align two texts.
|
7 |
|
8 |
The current implementation has been developed in Python 3 and ``gradio``.
|
9 |
|
10 |
Motivation
|
11 |
**********
|
12 |
|
13 |
+
Properly aligned texts (paragraph-to-paragraph or sentence-to-sentence) find applications in machine learning (e.g. machine translation), CAT (tmx, translation terms etc.) and education (dual-language ebook), etc.
|
14 |
|
15 |
Limitations
|
16 |
***********
|
radiobee/__main__.py
CHANGED
@@ -4,10 +4,13 @@ from typing import Any, Tuple, Optional, Union # noqa
|
|
4 |
|
5 |
import sys
|
6 |
from pathlib import Path
|
|
|
7 |
import signal
|
8 |
from random import randint
|
9 |
from textwrap import dedent
|
10 |
from itertools import zip_longest
|
|
|
|
|
11 |
from socket import socket, AF_INET, SOCK_STREAM
|
12 |
|
13 |
from sklearn.cluster import DBSCAN # noqa
|
@@ -450,6 +453,7 @@ if __name__ == "__main__":
|
|
450 |
|
451 |
# close all existing figures, necesssary for hf spaces
|
452 |
plt.close("all")
|
|
|
453 |
# if sys.platform not in ["win32", "linux"]:
|
454 |
plt.switch_backend('Agg') # to cater for Mac, thanks to WhiteFox
|
455 |
|
@@ -603,11 +607,25 @@ if __name__ == "__main__":
|
|
603 |
css=f"{css_image} {css_input_file} {css_output_file}",
|
604 |
)
|
605 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
606 |
iface.launch(
|
607 |
share=False,
|
608 |
# share=True,
|
609 |
debug=debug,
|
610 |
-
server_name=
|
611 |
# server_name="127.0.0.1",
|
612 |
server_port=server_port,
|
613 |
# show_tips=True,
|
|
|
4 |
|
5 |
import sys
|
6 |
from pathlib import Path
|
7 |
+
import platform
|
8 |
import signal
|
9 |
from random import randint
|
10 |
from textwrap import dedent
|
11 |
from itertools import zip_longest
|
12 |
+
|
13 |
+
# import socket
|
14 |
from socket import socket, AF_INET, SOCK_STREAM
|
15 |
|
16 |
from sklearn.cluster import DBSCAN # noqa
|
|
|
453 |
|
454 |
# close all existing figures, necesssary for hf spaces
|
455 |
plt.close("all")
|
456 |
+
|
457 |
# if sys.platform not in ["win32", "linux"]:
|
458 |
plt.switch_backend('Agg') # to cater for Mac, thanks to WhiteFox
|
459 |
|
|
|
607 |
css=f"{css_image} {css_input_file} {css_output_file}",
|
608 |
)
|
609 |
|
610 |
+
uname = platform.uname()
|
611 |
+
# node = uname.node
|
612 |
+
|
613 |
+
# match = re.search(r'[a-z\d]{10,}', gethostname())
|
614 |
+
# hf spaces release: '4.14.248-189.473.amzn2.x86_64'
|
615 |
+
# match = re.search(r'[a-z\d]{10,}', node)
|
616 |
+
# if match and node.system.lower() in ["linux"]:
|
617 |
+
if "amzn2" in uname.release:
|
618 |
+
# likely hf spaces
|
619 |
+
server_name = "0.0.0.0"
|
620 |
+
debug = False
|
621 |
+
else:
|
622 |
+
server_name = "127.0.0.1"
|
623 |
+
|
624 |
iface.launch(
|
625 |
share=False,
|
626 |
# share=True,
|
627 |
debug=debug,
|
628 |
+
server_name=server_name,
|
629 |
# server_name="127.0.0.1",
|
630 |
server_port=server_port,
|
631 |
# show_tips=True,
|