Skip to content

Commit

Permalink
update Name
Browse files Browse the repository at this point in the history
  • Loading branch information
dreamyang-liu committed Feb 2, 2021
1 parent 4b4cefa commit 7b81748
Show file tree
Hide file tree
Showing 14 changed files with 63 additions and 63 deletions.
2 changes: 1 addition & 1 deletion .htaccess
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# [...]
# </Directory>
#
# (See also https://nlp.dlwlrat.org/troubleshooting.html)
# (See also https://nlp.SciAnnotate.org/troubleshooting.html)
<FilesMatch "^(\.htaccess|config\.py)$">
Require all granted
</FilesMatch>
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM python:3.7.9
WORKDIR /
RUN git clone https://github.com/leonard-thong/dlwlrat.git /dlwlrat && cd dlwlrat && git checkout lmy-dev && bash ./docker_install.sh
WORKDIR /dlwlrat
RUN git clone https://github.com/leonard-thong/SciAnnotate.git /SciAnnotate && cd SciAnnotate && git checkout lmy-dev && bash ./docker_install.sh
WORKDIR /SciAnnotate
CMD ["python3", "standalone.py"]
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Deep Learning Model Annotation Tool (dlwlrat) #
# Deep Learning Model Annotation Tool (SciAnnotate) #

## Quick start installation: standalone server ##

First, please note the following:

- The dlwlrat standalone server only is available in dlwlrat v1.0 and above.
- The SciAnnotate standalone server only is available in SciAnnotate v1.0 and above.
- The standalone server is experimental and should not be used for sensitive data or systems accessible from the internet.


Expand All @@ -17,7 +17,7 @@ Start the standalone server
python standalone.py


You should then be able to access the dlwlrat server from the address printed out by standalone.py.
You should then be able to access the SciAnnotate server from the address printed out by standalone.py.

## Add New Labeling Functions

Expand Down
4 changes: 2 additions & 2 deletions ajax.cgi
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
# -*- Mode: Python; tab-width: 4; indent-tabs-mode: nil; -*-
# vim:set ft=python ts=4 sw=4 sts=4 autoindent:

"""Entry for CGI calls to dlwlrat. A simple wrapper around the CGI handling that
then delegates the work to the CGI-agnostic dlwlrat server.
"""Entry for CGI calls to SciAnnotate. A simple wrapper around the CGI handling that
then delegates the work to the CGI-agnostic SciAnnotate server.
Author: Pontus Stenetorp <pontus is s u-tokyo ac jp>
Version: 2011-02-07
Expand Down
8 changes: 4 additions & 4 deletions ajax.fcgi
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
# vim:set ft=python ts=4 sw=4 sts=4 autoindent:

'''
Entry for FastCGI calls to dlwlrat. This is a simple wrapper around a persistent
WSGI server that delegates the processing to the FastCGI-agnostic dlwlrat server.
Entry for FastCGI calls to SciAnnotate. This is a simple wrapper around a persistent
WSGI server that delegates the processing to the FastCGI-agnostic SciAnnotate server.
Depends on flup:
Expand Down Expand Up @@ -37,7 +37,7 @@ sys_path.append(path_join(dirname(__file__), 'server/src'))

from server import serve

def dlwlrat_app(environ, start_response):
def SciAnnotate_app(environ, start_response):
# Get the data required by the server
try:
remote_addr = environ['REMOTE_ADDR']
Expand Down Expand Up @@ -73,5 +73,5 @@ def dlwlrat_app(environ, start_response):

if __name__ == '__main__':
from sys import exit
WSGIServer(dlwlrat_app).run()
WSGIServer(SciAnnotate_app).run()
exit(0)
6 changes: 3 additions & 3 deletions config_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
# This configuration file specifies the global setup of the brat
# server. It is recommended that you use the installation script
# instead of editing this file directly. To do this, run the following
# command in the dlwlrat directory:
# command in the SciAnnotate directory:
#
# ./install.sh
#
# if you wish to configure the server manually, you will first need to
# make sure that this file appears as config.py in the dlwlrat server
# make sure that this file appears as config.py in the SciAnnotate server
# root directory. If this file is currently named config_template.py,
# you can do this as follows:
#
Expand All @@ -24,7 +24,7 @@
# Contact email for users to use if the software encounters errors
ADMIN_CONTACT_EMAIL = CHANGE_ME

# Directories required by the dlwlrat server:
# Directories required by the SciAnnotate server:
#
# BASE_DIR: directory in which the server is installed
# DATA_DIR: directory containing texts and annotations
Expand Down
28 changes: 14 additions & 14 deletions diff.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<html lang="en-US" xml:lang="en-US" xmlns="https://www.w3.org/1999/xhtml">
<head>
<title>dlwlrat</title>
<title>SciAnnotate</title>
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8"/>
<meta name="google" value="notranslate"/>
<link href="static/jquery-theme/jquery-ui.css" rel="stylesheet" type="text/css"/>
Expand Down Expand Up @@ -139,7 +139,7 @@
<p class="unselectable">Your browser has JavaScript
disabled, or does not support it.</p>
<p class="unselectable">
<span class="logo">dlwlrat</span>
<span class="logo">SciAnnotate</span>
needs JavaScript in order to run.
</p>
<p class="unselectable">Please enable JavaScript or try
Expand All @@ -160,7 +160,7 @@
<div id="commentpopup"/>
<div id="header" class="ui-widget">
<div id="mainHeader" class="ui-widget-header">
<div id="mainlogo" class="logo unselectable">dlwlrat</div>
<div id="mainlogo" class="logo unselectable">SciAnnotate</div>
<span id="navbuttons">
<img id="prev" alt="Previous document (Cursor Left)" title="Previous document (Cursor Left)" src="static/img/arrow-180.png"/><img id="next" alt="Next document (Cursor Right)" title="Next document (Cursor Right)" src="static/img/arrow.png"/>
</span>
Expand Down Expand Up @@ -788,44 +788,44 @@
<img src="static/img/spinner.gif"/>
</div>
<!-- "About" dialog -->
<div id="about" class="dialog unselectable" title="About dlwlrat">
<div id="aboutlogo" class="logo">dlwlrat</div>
<div id="about" class="dialog unselectable" title="About SciAnnotate">
<div id="aboutlogo" class="logo">SciAnnotate</div>
<!--This software is distributed under the <a target="licence" href="https://www.opensource.org/licenses/isc-license">ISC Licence</a>.-->
<div align="center">dlwlrat rapid annotation tool</div>
<div align="center">SciAnnotate rapid annotation tool</div>
<div style="font-size:60%" align="center">v1.0 "Lame Pony"</div>
<div id="copyright">&copy; 2020-2021 The dlwlrat contributors</div>
<div id="copyright">&copy; 2020-2021 The SciAnnotate contributors</div>
</div>
<!-- Welcome/tutorial dialog -->
<div id="tutorial" class="dialog unselectable" title="Tutorial">
<h2>Welcome to the dlwlrat annotation tool!</h2>
<h2>Welcome to the SciAnnotate annotation tool!</h2>
<div id="browserwarning">
<p>
Please be aware that
<span class="logo">dlwlrat</span>
<span class="logo">SciAnnotate</span>
is currently only fully supported on
<a href="https://www.google.com/chrome">Google Chrome</a>
and
<a href="https://www.apple.com/safari/">Safari</a>.
In other browsers, it may exhibit various degrees of problems,
from minor annoyances to severe ones that make
<span class="logo">dlwlrat</span>
<span class="logo">SciAnnotate</span>
unusable. For more information, see the page on
<a href="https://brat.nlplab.org/supported-browsers.html" target="manual">browser support</a>.
</p>
<p>
Please consider using <span class="logo">dlwlrat</span> in
Please consider using <span class="logo">SciAnnotate</span> in
a fully supported browser for a better user experience.
</p>
</div>
<p>Below is a mini-tutorial for basic usage. For detailed
instructions, please see
the <a href="https://brat.nlplab.org/manual.html" target="manual">dlwlrat
the <a href="https://brat.nlplab.org/manual.html" target="manual">SciAnnotate
user manual</a>.</p>
<h3>Selecting a document</h3>
<p>After closing this tutorial, you will see the collection
browser, which allows you to access the different text
collections and individual documents in those collections on
your dlwlrat installation. Simply double-click on a collection
your SciAnnotate installation. Simply double-click on a collection
name to show its contents or on a document name to open it.
</p>
<p>You can later return to the collection browser by pressing the
Expand Down Expand Up @@ -873,7 +873,7 @@
configuration of each collection.)
</p>
<h3>Advanced usage</h3>
<p>Please see the <a href="https://brat.nlplab.org/manual.html">dlwlrat user
<p>Please see the <a href="https://brat.nlplab.org/manual.html">SciAnnotate user
manual</a> for more!
</p>
</div>
Expand Down
Binary file added dlwlrat.tar.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion docker_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ else
fi
done
echo "Please enter the administrator contact email:"
admin_email="admin@dlwlrat.org"
admin_email="admin@SciAnnotate.org"
fi

# Put a configuration in place.
Expand Down
28 changes: 14 additions & 14 deletions index.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<html lang="en-US" xml:lang="en-US" xmlns="https://www.w3.org/1999/xhtml">

<head>
<title>dlwlrat</title>
<title>SciAnnotate</title>
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />
<meta http-equiv="Access-Control-Allow-Origin" content="*" />
<meta name="google" value="notranslate" />
Expand Down Expand Up @@ -125,7 +125,7 @@
<h1 class="unselectable">No JavaScript</h1>
<p class="unselectable">Your browser has JavaScript disabled, or does not support it.</p>
<p class="unselectable">
<span class="logo">dlwlrat</span> needs JavaScript in order to run.
<span class="logo">SciAnnotate</span> needs JavaScript in order to run.
</p>
<p class="unselectable">Please enable JavaScript or try a <a
href="https://brat.nlplab.org/supported-browsers.html">supported browser</a>
Expand Down Expand Up @@ -190,7 +190,7 @@
<div id="commentpopup" />
<div id="header" class="ui-widget">
<div id="mainHeader" class="ui-widget-header">
<div id="mainlogo" class="logo unselectable">dlwlrat</div>
<div id="mainlogo" class="logo unselectable">SciAnnotate</div>
<span id="navbuttons">
<img id="prev" alt="Previous document (Cursor Left)" title="Previous document (Cursor Left)"
src="static/img/arrow-180.png" /><img id="next" alt="Next document (Cursor Right)"
Expand Down Expand Up @@ -1046,33 +1046,33 @@
<img src="static/img/spinner.gif" />
</div>
<!-- "About" dialog -->
<div id="about" class="dialog unselectable" title="About dlwlrat">
<div id="aboutlogo" class="logo">dlwlrat</div>
<div id="about" class="dialog unselectable" title="About SciAnnotate">
<div id="aboutlogo" class="logo">SciAnnotate</div>
<!--This software is distributed under the <a target="licence" href="https://www.opensource.org/licenses/isc-license">ISC Licence</a>.-->
<div align="center">dlwlrat rapid annotation tool</div>
<div align="center">SciAnnotate rapid annotation tool</div>
<div style="font-size:60%" align="center">v1.0 "Lame Pony"</div>
<div id="copyright">&copy; 2020-2021 The dlwlrat contributors</div>
<div id="copyright">&copy; 2020-2021 The SciAnnotate contributors</div>
</div>
<!-- Welcome/tutorial dialog -->
<div id="tutorial" class="dialog unselectable" title="Tutorial">
<h2>Welcome to the dlwlrat annotation tool!</h2>
<h2>Welcome to the SciAnnotate annotation tool!</h2>
<div id="browserwarning">
<p>
Please be aware that
<span class="logo">dlwlrat</span> is currently only fully supported on
<span class="logo">SciAnnotate</span> is currently only fully supported on
<a href="https://www.google.com/chrome">Google Chrome</a> and
<a href="https://www.apple.com/safari/">Safari</a>. In other browsers, it may exhibit various degrees of problems, from minor annoyances to severe ones that make
<span class="logo">dlwlrat</span> unusable. For more information, see the page on
<span class="logo">SciAnnotate</span> unusable. For more information, see the page on
<a href="https://brat.nlplab.org/supported-browsers.html" target="manual">browser support</a>.
</p>
<p>
Please consider using <span class="logo">dlwlrat</span> in a fully supported browser for a better user experience.
Please consider using <span class="logo">SciAnnotate</span> in a fully supported browser for a better user experience.
</p>
</div>
<p>Below is a mini-tutorial for basic usage. For detailed instructions, please see the <a href="https://brat.nlplab.org/manual.html" target="manual">dlwlrat
<p>Below is a mini-tutorial for basic usage. For detailed instructions, please see the <a href="https://brat.nlplab.org/manual.html" target="manual">SciAnnotate
user manual</a>.</p>
<h3>Selecting a document</h3>
<p>After closing this tutorial, you will see the collection browser, which allows you to access the different text collections and individual documents in those collections on your dlwlrat installation. Simply double-click on a collection name to show
<p>After closing this tutorial, you will see the collection browser, which allows you to access the different text collections and individual documents in those collections on your SciAnnotate installation. Simply double-click on a collection name to show
its contents or on a document name to open it.
</p>
<p>You can later return to the collection browser by pressing the TAB key or by clicking on &quot;Collection&quot; in the menu.
Expand Down Expand Up @@ -1105,7 +1105,7 @@
<p>(The available annotation types and other aspects depend on the configuration of each collection.)
</p>
<h3>Advanced usage</h3>
<p>Please see the <a href="https://brat.nlplab.org/manual.html">dlwlrat user
<p>Please see the <a href="https://brat.nlplab.org/manual.html">SciAnnotate user
manual</a> for more!
</p>
</div>
Expand Down
8 changes: 4 additions & 4 deletions offline.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,11 @@
<div id="waiter" class="dialog" title="Please wait">
<img src="static/img/spinner.gif"/>
</div>
<div id="about" class="dialog unselectable" title="About dlwlrat">
<div id="aboutlogo" class="logo">dlwlrat</div>
<div id="about" class="dialog unselectable" title="About SciAnnotate">
<div id="aboutlogo" class="logo">SciAnnotate</div>
<!--This software is distributed under the <a target="licence" href="https://www.opensource.org/licenses/isc-license">ISC Licence</a>.-->
<div align="center">dlwlrat rapid annotation tool</div>
<div id="copyright">&copy; 2020-2021 The dlwlrat contributors</div>
<div align="center">SciAnnotate rapid annotation tool</div>
<div id="copyright">&copy; 2020-2021 The SciAnnotate contributors</div>
</div>
</body>
</html>
4 changes: 2 additions & 2 deletions server/src/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ def cache_model_results(**kwargs):
real_dir = real_directory(collection)
document = path_join(real_dir, document)
model_results = json.loads(kwargs['data'])
with open('/tmp/DLWLRAT-Model-{}.json'.format(get_md5_hash(document)), 'w') as f:
with open('/tmp/SciAnnotate-Model-{}.json'.format(get_md5_hash(document)), 'w') as f:
json.dump(model_results, f)

model_resutls_entities = model_results['entities']
Expand All @@ -239,7 +239,7 @@ def get_cached_model_results(**kwargs):
real_dir = real_directory(collection)
document = path_join(real_dir, document)
cached_model_results = None
with open('/tmp/DLWLRAT-Model-{}.json'.format(get_md5_hash(document)), 'w') as f:
with open('/tmp/SciAnnotate-Model-{}.json'.format(get_md5_hash(document)), 'w') as f:
cached_model_results = json.load(f)
res['data'] = cached_model_results
return res
Expand Down
2 changes: 1 addition & 1 deletion static/style-ui.css
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ div.scroll_wrapper_upper div.scroller {
margin-right: 100px;
}
#document_name input {
width: 95%;
width: 90%;
border: none;
font-family: 'denmark'
}
Expand Down
24 changes: 12 additions & 12 deletions tools/servlet/README.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
# dlwlrat servlet #
# SciAnnotate servlet #

This is a full-fledged dlwlrat CGI servlet to deploy dlwlrat on Tomcat. While this
This is a full-fledged SciAnnotate CGI servlet to deploy SciAnnotate on Tomcat. While this
is a bit of an exotic usecase, it is an existing one and this README along
with the XML provided should keep you from crying your eyes out while solving
this exercise.

# Building #

First, some words on how this works. You will attempt to create a WAR (Web
application ARchive) containing a working dlwlrat installation. This means you
will first have to install dlwlrat as usual and deploy your data. Create the dlwlrat
folder structure as shown (`dlwlrat/WEB-INF`, `dlwlrat/META-INF`) with the given
`web.xml` and `context.xml`. Copy your previously installed dlwlrat installation
to `dlwlrat/`, then, proving that you don't need ant to build something Java-ish,
simply go to the parent folder of `dlwlrat`, where the `GNUmakefile` is, and run:
application ARchive) containing a working SciAnnotate installation. This means you
will first have to install SciAnnotate as usual and deploy your data. Create the SciAnnotate
folder structure as shown (`SciAnnotate/WEB-INF`, `SciAnnotate/META-INF`) with the given
`web.xml` and `context.xml`. Copy your previously installed SciAnnotate installation
to `SciAnnotate/`, then, proving that you don't need ant to build something Java-ish,
simply go to the parent folder of `SciAnnotate`, where the `GNUmakefile` is, and run:

make

This will produce an archive `dlwlrat.war` that you can deploy on Tomcat.
This will produce an archive `SciAnnotate.war` that you can deploy on Tomcat.

# Installation #

Drop the `dlwlrat.war` into the Tomcat `webapps` directory and you should be able
Drop the `SciAnnotate.war` into the Tomcat `webapps` directory and you should be able
to access your installation using:

https://${HOSTNAME}:${PORT}/dlwlrat/
https://${HOSTNAME}:${PORT}/SciAnnotate/

From now on, dlwlrat should work as usual with the exception that it is Tomcat
From now on, SciAnnotate should work as usual with the exception that it is Tomcat
serving your requests.

0 comments on commit 7b81748

Please sign in to comment.