metadiscourse-annotator's People
metadiscourse-annotator's Issues
Add navigation links everywhere
Set the polarity during the annotation as set up for marker
[Insight] Unused method, property, variable or parameter - in src/…/Controller/DefaultController.php, line 18
in src/AppBundle/Controller/DefaultController.php, line 18
This
texts
local variable is declared but never used. You should remove it.
/**
* @Route("/", name="homepage")
*/
public function indexAction(Request $request)
{
$texts = $this->getDoctrine()
->getRepository('AppBundle:Text')
->findAll();
/*
return $this->render('FrontPage/index.html.twig', array(
'texts' => $texts,
Posted from SensioLabsInsight
Ensure that markers are unique
Reset the highlighting of save button after next/prev
Counts do not take into account alternative forms
Editing of categories does not work anymore
When clicking "Edit category" the program goes back to the admin screen
[Insight] Website should be protected against XSSVulnerability - in app/…/Annotator/annotation.css.twig, line 11
in app/Resources/views/Annotator/annotation.css.twig, line 11
Using the
|raw
filter or the{% autoescape false %}
block in a Twig template exposes users to Cross-Site Scripting (XSS) attacks
font-size: 12px;
}
{% for sense in senses %}
span.sense{{sense.id}} {
background-color: {{ sense.bgcolor | raw}};
color: {{ sense.fgcolor | raw}};
border: dotted thin black;
padding: 2px;
}
{% endfor %}
Posted from SensioLabsInsight
[Insight] Symfony applications should not contain a config.php file - in web, line 0
This
config.php
file should only be used to bootstrap a Symfony application. Before releasing to production, you should remove it, otherwise attackers could get valuable insight about your application.
web/
├── css/
├── font-awesome/
├── jquery/
├── js/
├── app.php
├── app_dev.php
├── apple-touch-icon.png
├── config.php
├── favicon.ico
├── robots.txt
└── test.html
Posted from SensioLabsInsight
[Insight] PHP code should follow PSR-1 basic coding standard - in src/AppBundle/Entity/Markable.php, line 61
in src/AppBundle/Entity/Markable.php, line 61
Method names should be declared in
camelCase
. You should rename this method to comply with PSR-1.
protected $domains;
/**
* The constructor
*/
public function _construct() {
$this->senses = new \Doctrine\Common\Collections\ArrayCollection();
$this->domains = new \Doctrine\Common\Collections\ArrayCollection();
}
/**
Posted from SensioLabsInsight
Ensure that the same version of bootstrap and jquery are used
Have statistics about senses in the analysis
[Insight] Missing use statement should be avoided - in src/…/CategoryAdminController.php, line 68
in src/AppBundle/Controller/CategoryAdminController.php, line 68
The
Category
class resolves to the following class:AppBundle\Entity\Category
.
Did you forget to add a corresponding use statement?
/**
* Creates a new category
* @Route("/admin/category/add", name="admin_category_add")
*/
public function addCategoryAction(Request $request) {
$category = new Category();
return $this->editCategory_intern($request, $category, false);
}
/**
Posted from SensioLabsInsight
Provide a way to edit categories
Currently it is not possible to edit/delete categories.
Display the alternative forms in the report for markers
Calculate statistics for each corpus
Calculate various statistics for corpora and display them
[Insight] PHP code should follow PSR-1 basic coding standard - in src/…/CategoryAdminController.php, line 99
in src/AppBundle/Controller/CategoryAdminController.php, line 99
Method names should be declared in
camelCase
. You should rename this method to comply with PSR-1.
* @param Request $request the request
* @param Category $category an object Category that will be edited
* @param bool $editing true if it edits an existing category
* @return type
*/
private function editCategory_intern($request, $category, $editing) {
$form = $this->createForm(new CategoryType(), $category);
$form->handleRequest($request);
if($form->isValid()) {
Posted from SensioLabsInsight
Make the descriptions optional
the shortcuts should not be active in the text box for notes
Provide a way to define more generic markers
Be able to deal with "Section X", "As X argues"
Do not consider capitalisation when identifying markers in texts
Move unrelated actions from the DefaultController
getSubcategory and getDataBySenseAction should be moved to more appropriate controllers
Redirect to login if a user tries to annotate a text directly without being logged on
Currently if a user accesses the document to annotate directly using the URL, but without being authenticated an exception happens
[Insight] Website should be protected against XSSVulnerability - in app/…/Search/search_term.html.twig, line 28
in app/Resources/views/Search/search_term.html.twig, line 28
Using the
|raw
filter or the{% autoescape false %}
block in a Twig template exposes users to Cross-Site Scripting (XSS) attacks
</div></div><div id="results" class="row voffset3"><div class="col-md-8 col-md-offset-2"><h3>The search results for {{ message | raw }}</h3></div><div class="voffset3 text-center">
{% if stats_for == "category" %}
{{ render_hinclude(controller(
Posted from SensioLabsInsight
[Insight] Website should be protected against XSSVulnerability - in app/…/Search/search_term_intern.html.twig, line 16
in app/Resources/views/Search/search_term_intern.html.twig, line 16
Using the
|raw
filter or the{% autoescape false %}
block in a Twig template exposes users to Cross-Site Scripting (XSS) attacks
{% block body %}
<div class="container"><div class="row voffset3"><div class="col-md-8 col-md-offset-2"><div><div><i>The statistics and annotation are from {{ search_scope|raw }}</i></div><h4>Statistics</h4><table class="table table-hover"><tr><td>Show</td><td>User</td>
Posted from SensioLabsInsight
Scroll where the markable is
Allow markers to contain more than one word
Enable annotation of multiword expressions. The most likely way to address this is to merge the relevant tokens into one.
[Insight] Controllers should contain a small set of actions
29% of all your controllers have more than 10 actions, the threshold is 5%.
Posted from SensioLabsInsight
[Insight] A route should always have a valid HTTP method
The route "search_category" should have a routing method (GET/POST/PUT). It is mandatory.
Posted from SensioLabsInsight
The system should not allow duplicate markers
Currently it is possible to have the same marker twice. This messes up the system.
Add a button that copies the default options
In cases where a marker has only one sense add a button that copies the only sense available to speed up the annotation.
Ensure that the alternative forms are unique and do not clash with existing markers
[Insight] Website should be protected against XSSVulnerability - in app/…/Annotator/annotation.css.twig, line 12
in app/Resources/views/Annotator/annotation.css.twig, line 12
Using the
|raw
filter or the{% autoescape false %}
block in a Twig template exposes users to Cross-Site Scripting (XSS) attacks
}
{% for sense in senses %}
span.sense{{sense.id}} {
background-color: {{ sense.bgcolor | raw}};
color: {{ sense.fgcolor | raw}};
border: dotted thin black;
padding: 2px;
}
{% endfor %}
Posted from SensioLabsInsight
Create a way to initialise the deployment
Currently the program make several assumptions about the state of the database. Create an action that makes all the necessary initialisation.
- insert "No parent category" category
[Insight] Public methods in controller classes should only be actions (with the <code>Action</code> suffix) - in src/…/Controller/AdminController.php, line 284
in src/AppBundle/Controller/AdminController.php, line 284
Non-action public method found in controller class
}
/**
* @Route("/admin/corpus/category/{corpus_id}/{value_id}")
*/
public function editCorpusCategory(\Symfony\Component\HttpFoundation\Request $request,
$corpus_id, $value_id) {
if($request->isXmlHttpRequest()) {
$em = $this->getDoctrine()->getManager();
$value = $this->getDoctrine()
Posted from SensioLabsInsight
Ensure that the user uploads a file when a new text is uploaded
Currently it is possible to click submit even if the user does not select a file. As a result an exception is thrown.
[Insight] The EntityManager should not be flushed within a loop - in src/…/Controller/AdminController.php, line 134
in src/AppBundle/Controller/AdminController.php, line 134
Calling
flush
is a resource intensive operation, especially when a lot of entities are managed by Doctrine. You should pass the entity you want to flush as parameter, or avoid flushing inside a loop.
->getRepository('AppBundle:Domain')
->findBy(array('name' => $name));
if(count($domain_name) == 0) {
$em = $this->getDoctrine()->getManager();
$em->persist($domain);
$em->flush();
}
} else {
break;
}
}
Posted from SensioLabsInsight
Provide a way to empty cache
Reset the colour of the "Save button" when moving to a new annotation
Set the category assigned to a sense during the annotation
Change is not detected when only subcategory is changed
During the annotation the "Save" button does not become enabled when only the subcategory is being changed.
Use the name of the file for the name of the text
Display a warning message if the user tries to move without saving the information
[Insight] Twig templates should not contain business logic - in app/…/marker/marker_report.html.twig, line 0
in app/Resources/views/Admin/marker/marker_report.html.twig
Template too complex, depth of 6 is reached but only 5 is allowed.
Posted from SensioLabsInsight
[Insight] The EntityManager should not be flushed within a loop - in src/…/Controller/AdminController.php, line 134
in src/AppBundle/Controller/AdminController.php, line 134
Calling
flush
is a resource intensive operation, especially when a lot of entities are managed by Doctrine. You should pass the entity you want to flush as parameter, or avoid flushing inside a loop.
->getRepository('AppBundle:Domain')
->findBy(array('name' => $name));
if(count($domain_name) == 0) {
$em = $this->getDoctrine()->getManager();
$em->persist($domain);
$em->flush();
}
} else {
break;
}
}
Posted from SensioLabsInsight
Add the option to import texts that have sentences on more than one line
Update the statistics when a alternative form is removed
The colours are not kept when a sense is edited
Move the "Add marker" button to top
When adding a marker display all the relevant categories
Currently the first level categories are not displayed even when they do not have leaf nodes
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.