Coder Social home page Coder Social logo

inphosemantics-frontend's Introduction

inphosemantics-frontend's People

Contributors

jaimiemurdock avatar srwaggon avatar wpettyjohn avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar

inphosemantics-frontend's Issues

Export Modal needs better Exception Handling

The data export modal needs more support for handling exceptions in the event that an export query is malformed (just a possibility) or possibly incomplete. An example of an incomplete query would be a query which is missing a parameter, whereas a malformed query could contain a phrase which is not available.

pre-loaded data slow to display

After having two corpora (IEP and SEP complete), one model (Beagle composite), and one term ('metaphysics') which correctly displayed two columns, I then added another term ('aristotle'). One of the previously loaded columns loaded immediately, but the other one didn't appear until new aristotle data had also loaded. Repeated exercise with 'fodor' as second term, and this time neither of the pre-loaded columns appeared until all four did.

model/corpus not removed by x

In the selection modal, if a [model/corpus/phrase] is selected, and the page is refreshed, the selected items will persist in the selection modal. However, they will lose the ability to be removed. Only newly-entered items will be removable.

This has to do with the similarities and contrasts between the ways that the hash-data propagates onto the page. The newly-entered data enters with an on-click function which is closed over the list item to be removed. The persisting elements lack this onclick attachment, and thus need to receive similar treatment.

Although this would be simple enough to fix, considering that this happens more than twice (6, in fact), it may be wise to abstract out the idea into a function and simply make the call six times rather than have 6x replicated code.

Can't add phrases which are substrings of preexisting phrases.

This actually goes the same for models and corpora I'm assuming, but that only affects TFIDF and TF.

Due to the way that we check if a phrase / corpus / model has already been selected for display, we disallow anything which is a substring of a pre-existing selection, as opposed to an exact match.

example: enter the phrase 'kant' followed by the phrase 'a'.

frontend losing state

Make some selections and load the data.
Hit 'Make selections' again and change value in number of results and hit enter while browser focus is still in the number box.

Results:

In Safari: all the other values are cleared (= reset)

In Firefox, things sometimes things go wrong, but I can't figure out exactly how. Sometimes the data is reloaded, but the next time you hit 'Make selections', all the values have been cleared; other times it loads a blank page. (You may have to cycle through 'make selections' a few times to see this.)

Values are also not being preserved when 'Export data' is selected, but I haven't opened a separate ticket on this because perhaps that part wasn't intended to be functional yet, and in any case it may be the same underlying problem.

initial issues

Glad to see this moving forward. A few alpha issues...

In the selection panel, the four different Beagle models are there in triplicate.

Unsure how long to wait... so could use some sort of wait indicator. However, have tried several hits from different browsers and with one exception nothing shows up under headers. Hitting reload removes even the headers.

A couple of times, the x button in the panel to remove a model didn't work, but I can't replicate that at the moment.

"#queryReset" needs to remove corresponding list items

The reset button on the "Make Selections" modal now resets window.location.hash as well as the form data, but it still needs to remove the corresponding list items. I believe the necessary functions associated with this are in Hash.js, which is why I'm assigning it to Sam.

hash should autoload data

If a URL with a hash is sent (e.g., this link), the corresponding data should automatically load. The "Make Selections" form currently autopopulates, but the data does not load.

central representation of available data sets on inphodata

At present, we are maintaining three representations of the available trained models on inphodata.

What would be nice to have:

  • one instead of three such representations
  • a hook so that InphoTrainer might semi-automatically update this representation
  • the facility to augment/modify the representation (new fields, etc) without too much pain

One idea:
inphosemantics/inpho/init.py would maintain a configuration file or light database. tinytornado could import a function from this module which returns all of the currently available data sets. The frontend could ask tinytornado for just the catalog of these data sets.

(In general, inphosemantics/inpho/init.py should probably be made its own module or down the road merged with other production inpho code.)

color coding of model & corpus in header

I think this is a simple request and I'd like to make it reasonably high priority...

Currently it's very hard to find the columns one wants to compare in a display such as this one:

http://inphodata.cogs.indiana.edu:8080/?corpora=sep.complete%2Ciep.complete&models=beagle.composite%2Cbeagle.context%2Cbeagle.order&phrases=kant%2Cdescartes&searchLimit=24

What would help is to assign a fixed color to each corpus and to each model, and then to use that color in the background of the corpus and model terms in the header of each panel.

Here are suggested color schemes:

SEP: red
IEP: light blue
PhilPapers: green
Malaria: yellow

Beagle-Environment: grey
Beagle-Context: blue
Beagle-Order: yellow
Beagle-Composite: light green
tf: pink
tf-idf: purple

Atomize Query Results into Panels

Currently, after the combinations for requests have been submitted and results have returned, all of the data is rendered as a giant tree-like table, containing a first order of copora, a second order of models, a third order of phrases and lastly the results.

I personally feel that this is a little ungainly and could be optimized if the cascading tables were converted into atomic panels for each combination. For example, instead of the table titled "Stanford Encyclopedia of Philosophy: Complete" having two child tables, "Beagle: Order Vectors" & "Beagle: Context Vectors", each of which having a child table for each phrase, I'd like to imagine that there would be a panel for each combination. That is, there would be a panel "SEP:Complete & Beagle: Order & Kant" as well as "SEP: Complete & Beagle: Order & Descartes" as well as "SEP: Complete & Beagle: Context & Kant", etc.

I believe that the paneling would be a good (although nontrivial) idea insofar as creating visual separation between query results as well as the future possibility of relocating particular panels so that the user may be able to place specific query-results side-by-side. This is somewhat related to the enhancement idea #17.

Corpus/Model not found error needs to be handled

Currently there is no actual SEP: Philosophy of Mind Corpus. Looking at the headers, one can see the 500 error. Clearly there needs to be some definitive feedback about this; as well as an explicit server error on the back end.

Color Coding for Phrases

Currently, each corpus and model has attached to it a fontcolor and a backgroundcolor, used to color its header in each query result. Phrases however are still black text on a white background, which doesn't stand out against the table so well anymore. In following suit, the javascript code should generate a unique and distinct colour for each phrase.

incomplete parameter warning

If some required element is missing in the submitted query (e.g. no term or no corpus), it should show a warning.

Poor/Missing Query Results Return with improper headings.

When the server fails to fetch the results for a query, or when the results do not exist, the returned result headers are both uncoloured and all match with the final query as opposed to each query that they correspond with.

An example of how to emulate this bug: select any corpus and any model, and any two phrases which are not in the selected corpus.

order of panels

The old style display was hierarchically sorted with the models providing the first branch, then the corpuses, then the terms. This made it relatively easy to locate corresponding lists from the different corpora and models. The new arrangement is more haphazard making it harder to match like with like. It also can vary between reloads. Is there a way to force a uniform display order?

Export data into Word2Word.csv

There needs to exist some mechanism for querying the inphosemantics backend for a similarity matrix given some corpus, model, & phrase combination. The data export should be in a comma separated value format compatible with Brent Kievit-Kylar's Word2Word.

camino 2.1.2 bug

(Low priority) Selection panel contains no info in dropdowns in Camino 2.1.2 (latest version / Mac)

misaligned columns

The table entries fall out of alignment if the headings wrap. Try entering SEP Phil Mind and SEP Complete. The first wraps and so pushes down its entries.

highlight same term across columns

One thing that is painful on the current interface is seeing when the same term appears in multiple lists - so perhaps implementing something that makes the same term bold in all lists if you mouseover it would help this discontinuity. Another option would be changing the background class to highlight the term.

column width

When a minimal number of selections are made (say 1-1-1), the
columns get stretched out too much.

corpus/model, term not available graphics

Let's assume that the front end is like a partial function. It's not defined on all inputs. But it also doesn't know in advance which inputs these are until it tries to evaluate. (a) The user might enter a term not in a lexicon; or (b) a model that a corpus hasn't been trained on.

Assume that the front end can consult an oracle and get a clear signal as to whether (a) or (b) happens. (See issues #2 and #4). What will the user see in the relevant column? A shaded column with a message?

Of course, this front end functionality can be made available before #2 and #4 are available.

Search terms not found errors

Nothing prevents a user from entering search terms not in the lexicon. There needs to be definitive feedback that the query was a failure.

Rendered Table Data is Bland: Discontinuity Absent?

After the requests have been sent out and return, we render the table data into several very tall columns. As they all sit side-by-side, this becomes somewhat overbearing to look at. I believe that it would be much more pleasing to view given that there were some visual separator between phrases, possibly also between models and between corpora.

A given solution might to provide wells to each phrase column so that they seem atomic unto themselves. Another suggestion given was to have an alternating style, whereas every other column might have a darkened background.

This possibly goes as well for models and corpora.

menu bar width for a lot of results

At the moment you can select as much stuff as you want. I'm not opposed to leaving it like that for now (especially because limiting the columns will require additional interface engineering). Still if we do, the menu bar should stretch out all the way. Right now, if you submit a ton of selections, the menu bar ends at 1000px or so even though the table keeps going. This looks bad.

Can't start server: NumPy version different than Previously used

When attempting to start up the tinytornado.py server, a flood of errors related to numpy are presented. Since the inphosemantics egg has not been updated for the inpho user on inphodata, it seems to me that the version of NumPy has changed (regressed?) on the development box.

/usr/local/lib/python2.6/dist-packages/scipy/init.py:97: UserWarning: Numpy
1.5.0 or above is recommended for this version of scipy (detected version 1.4.1)
UserWarning)
RuntimeError: module compiled against API version 6 but this version of numpy is
4
RuntimeError: module compiled against API version 6 but this version of numpy is
4
RuntimeError: module compiled against API version 6 but this version of numpy is
4
Traceback (most recent call last):
File "./tinytornado.py", line 5, in
from inphosemantics import inpho # Used for semantic processing.
File "/home/inpho/.local/lib/python2.6/site-packages/inphosemantics-0.1-py2.6.
egg/inphosemantics/inpho/init.py", line 19, in
from inphosemantics.model.tf import TfModel
File "/home/inpho/.local/lib/python2.6/site-packages/inphosemantics-0.1-py2.6.
egg/inphosemantics/model/init.py", line 5, in
from scipy.sparse import issparse
File "/usr/local/lib/python2.6/dist-packages/scipy/sparse/init.py", line 1
75, in
from csr import *
File "/usr/local/lib/python2.6/dist-packages/scipy/sparse/csr.py", line 12, in

from sparsetools import csr_tocsc, csr_tobsr, csr_count_blocks,
File "/usr/local/lib/python2.6/dist-packages/scipy/sparse/sparsetools/init
.py", line 4, in
from csr import *
File "/usr/local/lib/python2.6/dist-packages/scipy/sparse/sparsetools/csr.py",
line 25, in
_csr = swig_import_helper()
File "/usr/local/lib/python2.6/dist-packages/scipy/sparse/sparsetools/csr.py",
line 21, in swig_import_helper
_mod = imp.load_module('_csr', fp, pathname, description)
ImportError: numpy.core.multiarray failed to import

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.