agoldst / dfr-browser Goto Github PK
View Code? Open in Web Editor NEWTake a MALLET to disciplinary history
License: MIT License
Take a MALLET to disciplinary history
License: MIT License
My first attempt works fine in Firefox, but seems not to load the data/models in Safari (Version 9.1 (11601.5.17.1)) or Chrome (Version 51.0.2704.19 dev (64-bit)). This happens when I Open the file in the browser, set up a local server, or try a server on the internet.
I'm working on adapting the topic modeling tool to work with this wonderful piece of software. In the process of getting a testing workflow set up, I found that the standard citations.tsv
file provided by the DFR tool, when passed to prepare-data
, appears to generate a rogue line like this at the end:
"10.2307/461391","The Telltale Teeth: [...]
"","" < -- here lieth a TypeError
JavaScript becomes confused when it tries to read the data from this line, and dies.
I think this is caused by an unfortunate blank line at the end of citations.tsv
. Fixing should be as simple as removing any blank lines from the input before processing, but I wanted to pass it by you before submitting a PR.
Just putting a marker here for a significant rewrite for the next version of dfr-browser, which allows for swapping among models or metadata covariates. (Visualizing more than one model / covariate at once is a yet later revision). I have been sitting on working code for this for a while, but I don't want to release it until the companion data-export functions for dfrtopics are ready.
I built a topic model and saved the files (.gz, .mallet) to load into dfr-browser. What is the metadata_file="dfr-data/citations.tsv
file and what format should it follow?
First of all kudos ๐ฏ for this amazing data explorer! I know that this question has been asked several times, my question is how to start with that in the case I have a very basic/raw LDA implementation (LDA/Gibbs) where the output data are like:
{
"topic": 1,
"terms": [
{
"term": "love",
"weight": 0.068
},
{
"term": "body",
"weight": 0.03
},
{
"term": "baby",
"weight": 0.027
},
{
"term": "girl",
"weight": 0.025
},
{
"term": "dance",
"weight": 0.02
}
]
}
i.e. the array of topics plus the metadata of the referring documents of course.
In recent versions of WebKit (Safari 9.1, Chrome 50.0.2661.86) declaring use strict
in utils.min.js seems to lead to the following error
TypeError: Attempted to assign to readonly property.
I believe the line in the minified version:
f[r] = t(n[r], e[r])
corresponds with line 58 of the non-minified version:
result[prop] = deep_replace(x[prop], repl[prop]);
It's entirely possible this is a WebKit bug; in the meantime, removing
"use strict";
from utils.min.js seems to make the problem go away.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.