You can view the user interface by clicking on this link: https://tanny411.github.io/Text-Label-Explorer/. If you're accessing it from a laptop, we recommend setting the zoom level to 50%. We are currently working on optimizing the layout to improve the viewing experience on all screen sizes and this will be included in the next update.
Name | Student ID | WATIAM |
---|---|---|
Aisha Khatun | 21012959 | a2khatun |
Mustapha Unubi Momoh | 20986226 | mmomoh |
If you want to run the python scripts, install the python requirements.
pip3 install -r requirements.txt
The python script is already run and data stored in the appropriate place. If you want to run with your own data, save your data as data/data.csv
following the format of the current data.csv file. Then run the python scripts:
python3 pyscripts/generate_embeddings.py
python3 pyscripts/get_topics.py
python3 pyscripts/arrange_data.py
The data will be stored in data
and pubilc
folder.
Inder to successfully load the resources, you need to use a Node.js server or a simple python server.
-
The server app
final_app.js
has already been provided. -
Initialize a new Node.js project by running the command:
npm init
-
Install Express as a dependency for your project by running the command:
npm install express
This will install the latest version of Express and add it to your project'spackage.json
file. -
Run the server with the command
npm start
ornode final_app.js
This will start the Node.js server with Express.
- To use python simple server, move all the files to the same location or folder. i.e all the datasets (csv files) and the style.css,
d3.layout.cloud.js
, andindex.html
- Open
index.html
and edit the file paths for all the referenced files. Since the files are now located in the same directory asindex.html
, remove the prefixes. The required changes are:
- From
href="public/style.css"
tohref="style.css"
- From
d3.csv("public/embeddings_new.csv"...
tod3.csv("embeddings_new.csv"...
- From
d3.csv("public/top_5_matches.csv"...
tod3.csv("top_5_matches.csv"...
- From
d3.csv(public/top_topics/${techniqueColumn}.csv....
tod3.csv(${techniqueColumn}.csv...
- From
d3.csv(public/text_label_explorer/${topic_file}.csv..
tod3.csv(${topic_file}.csv..
- Lastly, run
python -m http.server
to start python simple server - Navigate to
http://localhost:8080
in your web browser - locate the
index.html
file, then click to open.
This project is open source and available under the MIT License.