diff --git a/vipra-cmd/src/main/java/de/vipra/cmd/CommandLineOptions.java b/vipra-cmd/src/main/java/de/vipra/cmd/CommandLineOptions.java index 30736fa1f5fb300981746b3ce192ed2d4a90cb62..aa975d692b3f2dbd441b6825ad07d84b4ebb9c33 100644 --- a/vipra-cmd/src/main/java/de/vipra/cmd/CommandLineOptions.java +++ b/vipra-cmd/src/main/java/de/vipra/cmd/CommandLineOptions.java @@ -111,7 +111,7 @@ public class CommandLineOptions { public String[] modelsToIndex() { final String[] models = getOptionValues(INDEX); if (models != null && models.length > 0) - return models; + return stripGroups(models); return selectedModels(); } @@ -126,7 +126,7 @@ public class CommandLineOptions { public String[] modelsToReread() { final String[] models = getOptionValues(REREAD); if (models != null && models.length > 0) - return models; + return stripGroups(models); return selectedModels(); } @@ -149,7 +149,7 @@ public class CommandLineOptions { public String[] modelsToCreate() { final String[] models = getOptionValues(CREATE); if (models != null && models.length > 0) - return models; + return stripGroups(models); return selectedModels(); } @@ -160,7 +160,7 @@ public class CommandLineOptions { public String[] modelsToDelete() { final String[] models = getOptionValues(DELETE); if (models != null && models.length > 0) - return models; + return stripGroups(models); return selectedModels(); } @@ -171,7 +171,7 @@ public class CommandLineOptions { public String[] modelsToEdit() { final String[] models = getOptionValues(EDIT); if (models != null && models.length > 0) - return models; + return stripGroups(models); return selectedModels(); } @@ -182,7 +182,7 @@ public class CommandLineOptions { public String[] modelsToPrint() { final String[] models = getOptionValues(PRINT); if (models != null && models.length > 0) - return models; + return stripGroups(models); return selectedModels(); } @@ -193,7 +193,7 @@ public class CommandLineOptions { public String[] filesToImport() { final String[] models = getOptionValues(IMPORT); if (models != null && models.length > 0) - return models; + return stripGroups(models); return selectedModels(); } @@ -204,7 +204,7 @@ public class CommandLineOptions { public String[] modelsToModel() { final String[] models = getOptionValues(MODEL); if (models != null && models.length > 0) - return models; + return stripGroups(models); return selectedModels(); } @@ -220,7 +220,7 @@ public class CommandLineOptions { models = getOptionValues(SELECT); if (models != null && models.length > 0) - return models; + return stripGroups(models); throw new RuntimeException("select at least one model"); } @@ -252,7 +252,7 @@ public class CommandLineOptions { public String[] modelsToRename() { final String[] models = getOptionValues(RENAME); if (models != null && models.length > 0) - return models; + return stripGroups(models); return selectedModels(); } @@ -263,7 +263,7 @@ public class CommandLineOptions { public String[] modelsToClear() { final String[] models = getOptionValues(CLEAR); if (models != null && models.length > 0) - return models; + return stripGroups(models); return selectedModels(); } @@ -275,4 +275,15 @@ public class CommandLineOptions { return getOptionValue(LOG); } + private static String[] stripGroups(final String[] names) { + if (names == null) + return null; + for (int i = 0; i < names.length; i++) { + final String[] parts = names[i].split(":"); + if (parts.length > 1) + names[i] = parts[1]; + } + return names; + } + } diff --git a/vipra-cmd/src/main/java/de/vipra/cmd/option/EditModelCommand.java b/vipra-cmd/src/main/java/de/vipra/cmd/option/EditModelCommand.java index 31d64c373c45e7ce78b5eb4a0cbf775e376d9423..600899af46f9373c7d12aaf617b3976394eb47c3 100644 --- a/vipra-cmd/src/main/java/de/vipra/cmd/option/EditModelCommand.java +++ b/vipra-cmd/src/main/java/de/vipra/cmd/option/EditModelCommand.java @@ -34,39 +34,47 @@ public class EditModelCommand implements Command { ConsoleUtils.info("editing model: " + topicModel.getName()); final TopicModelConfig topicModelConfig = topicModel.getModelConfig(); - topicModelConfig.setDescription(ConsoleUtils.readString("description (↲ to skip)", topicModelConfig.getDescription(), true)); - topicModelConfig.setkTopics(ConsoleUtils.readInt("k topics", topicModelConfig.getkTopics(), 1, null, true)); - topicModelConfig - .setDynamicMinIterations(ConsoleUtils.readInt("dynamic min iterations", topicModelConfig.getDynamicMinIterations(), 1, null, true)); - topicModelConfig.setDynamicMaxIterations(ConsoleUtils.readInt("dynamic max iterations", topicModelConfig.getDynamicMaxIterations(), - topicModelConfig.getDynamicMinIterations(), null, true)); - topicModelConfig.setStaticIterations(ConsoleUtils.readInt("static iterations", topicModelConfig.getStaticIterations(), 1, null, true)); - topicModelConfig - .setTopicAutoNamingWords(ConsoleUtils.readInt("topic auto naming words", topicModelConfig.getTopicAutoNamingWords(), 1, null, true)); - topicModelConfig - .setMaxSimilarDocuments(ConsoleUtils.readInt("max similar documents", topicModelConfig.getMaxSimilarDocuments(), 0, null, true)); - topicModelConfig - .setDocumentMinimumLength(ConsoleUtils.readInt("document min length", topicModelConfig.getDocumentMinimumLength(), 0, null, true)); - topicModelConfig.setDocumentMinimumWordFrequency( - ConsoleUtils.readInt("document min word frequency", topicModelConfig.getDocumentMinimumWordFrequency(), 0, null, true)); - topicModelConfig.setSpotlightSupport(ConsoleUtils.readInt("spotlight support", topicModelConfig.getSpotlightSupport(), 0, null, true)); - topicModelConfig - .setSpotlightConfidence(ConsoleUtils.readDouble("spotlight confidence", topicModelConfig.getSpotlightConfidence(), 0.0, 1.0, true)); - topicModelConfig.setMinRelativeProbability( - ConsoleUtils.readDouble("min relative probability", topicModelConfig.getMinRelativeProbability(), 0.0, 1.0, true)); - topicModelConfig.setRisingDecayLambda(ConsoleUtils.readDouble("rising decay lambda", topicModelConfig.getRisingDecayLambda())); - topicModelConfig.setMaxSimilarDocumentsDivergence( - ConsoleUtils.readDouble("max similar documents divergence", topicModelConfig.getMaxSimilarDocumentsDivergence(), 0.0, 1.0, true)); - topicModelConfig.setMaxSimilarTopicsDivergence( - ConsoleUtils.readDouble("max similar topics divergence", topicModelConfig.getMaxSimilarTopicsDivergence(), 0.0, 1.0, true)); - topicModelConfig.setProcessorUseText(ConsoleUtils.readBoolean("processor use text", topicModelConfig.isProcessorUseText())); - topicModelConfig.setProcessorUseEntities(ConsoleUtils.readBoolean("processor use entities", topicModelConfig.isProcessorUseEntities())); - topicModelConfig - .setProcessorUseEntityTypes(ConsoleUtils.readBoolean("processor use entity types", topicModelConfig.isProcessorUseEntityTypes())); - topicModelConfig.setProcessorUseHypernyms(ConsoleUtils.readBoolean("processor use hypernyms", topicModelConfig.isProcessorUseHypernyms())); - topicModelConfig.setQueryEntityDescriptions(ConsoleUtils.readBoolean("query entity types", topicModelConfig.isQueryEntityDescriptions())); - topicModelConfig - .setWindowResolution(ConsoleUtils.readEnum(WindowResolution.class, "window resolution", topicModelConfig.getWindowResolution())); + topicModelConfig.setDescription( + ConsoleUtils.readString(" " + ConsoleUtils.PATH_T + " description (↲ to skip)", topicModelConfig.getDescription(), true)); + topicModelConfig.setkTopics(ConsoleUtils.readInt(" " + ConsoleUtils.PATH_T + " k topics", topicModelConfig.getkTopics(), 1, null, true)); + topicModelConfig.setDynamicMinIterations(ConsoleUtils.readInt(" " + ConsoleUtils.PATH_T + " dynamic min iterations", + topicModelConfig.getDynamicMinIterations(), 1, null, true)); + topicModelConfig.setDynamicMaxIterations(ConsoleUtils.readInt(" " + ConsoleUtils.PATH_T + " dynamic max iterations", + topicModelConfig.getDynamicMaxIterations(), topicModelConfig.getDynamicMinIterations(), null, true)); + topicModelConfig.setStaticIterations( + ConsoleUtils.readInt(" " + ConsoleUtils.PATH_T + " static iterations", topicModelConfig.getStaticIterations(), 1, null, true)); + topicModelConfig.setTopicAutoNamingWords(ConsoleUtils.readInt(" " + ConsoleUtils.PATH_T + " topic auto naming words", + topicModelConfig.getTopicAutoNamingWords(), 1, null, true)); + topicModelConfig.setMaxSimilarDocuments( + ConsoleUtils.readInt(" " + ConsoleUtils.PATH_T + " max similar documents", topicModelConfig.getMaxSimilarDocuments(), 0, null, true)); + topicModelConfig.setDocumentMinimumLength( + ConsoleUtils.readInt(" " + ConsoleUtils.PATH_T + " document min length", topicModelConfig.getDocumentMinimumLength(), 0, null, true)); + topicModelConfig.setDocumentMinimumWordFrequency(ConsoleUtils.readInt(" " + ConsoleUtils.PATH_T + " document min word frequency", + topicModelConfig.getDocumentMinimumWordFrequency(), 0, null, true)); + topicModelConfig.setSpotlightSupport( + ConsoleUtils.readInt(" " + ConsoleUtils.PATH_T + " spotlight support", topicModelConfig.getSpotlightSupport(), 0, null, true)); + topicModelConfig.setSpotlightConfidence(ConsoleUtils.readDouble(" " + ConsoleUtils.PATH_T + " spotlight confidence", + topicModelConfig.getSpotlightConfidence(), 0.0, 1.0, true)); + topicModelConfig.setMinRelativeProbability(ConsoleUtils.readDouble(" " + ConsoleUtils.PATH_T + " min relative probability", + topicModelConfig.getMinRelativeProbability(), 0.0, 1.0, true)); + topicModelConfig.setRisingDecayLambda( + ConsoleUtils.readDouble(" " + ConsoleUtils.PATH_T + " rising decay lambda", topicModelConfig.getRisingDecayLambda())); + topicModelConfig.setMaxSimilarDocumentsDivergence(ConsoleUtils.readDouble(" " + ConsoleUtils.PATH_T + " max similar documents divergence", + topicModelConfig.getMaxSimilarDocumentsDivergence(), 0.0, 1.0, true)); + topicModelConfig.setMaxSimilarTopicsDivergence(ConsoleUtils.readDouble(" " + ConsoleUtils.PATH_T + " max similar topics divergence", + topicModelConfig.getMaxSimilarTopicsDivergence(), 0.0, 1.0, true)); + topicModelConfig.setProcessorUseText( + ConsoleUtils.readBoolean(" " + ConsoleUtils.PATH_T + " processor use text", topicModelConfig.isProcessorUseText())); + topicModelConfig.setProcessorUseEntities( + ConsoleUtils.readBoolean(" " + ConsoleUtils.PATH_T + " processor use entities", topicModelConfig.isProcessorUseEntities())); + topicModelConfig.setProcessorUseEntityTypes( + ConsoleUtils.readBoolean(" " + ConsoleUtils.PATH_T + " processor use entity types", topicModelConfig.isProcessorUseEntityTypes())); + topicModelConfig.setProcessorUseHypernyms( + ConsoleUtils.readBoolean(" " + ConsoleUtils.PATH_T + " processor use hypernyms", topicModelConfig.isProcessorUseHypernyms())); + topicModelConfig.setQueryEntityDescriptions( + ConsoleUtils.readBoolean(" " + ConsoleUtils.PATH_T + " query entity types", topicModelConfig.isQueryEntityDescriptions())); + topicModelConfig.setWindowResolution(ConsoleUtils.readEnum(WindowResolution.class, " " + ConsoleUtils.PATH_L + " window resolution", + topicModelConfig.getWindowResolution())); dbTopicModels.updateSingle(topicModel, "modelConfig"); topicModelConfig.saveToFile(topicModelConfig.getModelDir(config.getDataDirectory())); diff --git a/vipra-ui/app/html/directives/entity-menu.html b/vipra-ui/app/html/directives/entity-menu.html index f386f64aabad450eba56e5e815b27a25752a938c..1e1c965f9a5b4776ce98e182240d3c9f6e9b758c 100644 --- a/vipra-ui/app/html/directives/entity-menu.html +++ b/vipra-ui/app/html/directives/entity-menu.html @@ -4,6 +4,7 @@ </a> <ul class="dropdown-menu" ng-class="{'dropdown-menu-right':dropdownRight}"> <li><a ui-sref="entities.show({id:entity.entity})">Show</a></li> + <li ng-if="entity.isWord"><a ui-sref="words.show({id:entity.entity})">Show word</a></li> <li role="separator" class="divider"></li> <li><a ui-sref="entities.show.articles({id:entity.entity})">Articles</a></li> <li role="separator" class="divider"></li> diff --git a/vipra-ui/app/html/entities/articles.html b/vipra-ui/app/html/entities/articles.html index 5b872312dd4b82e83a0b5db61deeeebc4f2513d0..dec71c1de08231a21d032dae254d0a2d732999cb 100644 --- a/vipra-ui/app/html/entities/articles.html +++ b/vipra-ui/app/html/entities/articles.html @@ -2,12 +2,13 @@ <div class="container" ng-cloak ng-hide="!rootModels.topicModel || state.name !== 'entities.show.articles'"> <div class="page-header no-border"> <span class="label label-default">Entity</span> - <h1 ng-bind="::entity"></h1> + <a class="label label-default" ng-if="entity.isWord" ui-sref="words.show({id:id})">Word</a> + <h1 ng-bind="::id"></h1> </div> <div> <ul class="nav nav-tabs" role="tablist"> <li> - <a ui-sref="entities.show({id:entity})"><i class="fa fa-file-text-o"></i></a> + <a ui-sref="entities.show({id:id})"><i class="fa fa-file-text-o"></i></a> </li> <li class="active"> <a> diff --git a/vipra-ui/app/html/help/articles.html b/vipra-ui/app/html/help/articles.html index 7a012ab25219235985f64df395f14a15209c6e98..a7c90ac64493ccc9500bb923886b1802695b2b69 100644 --- a/vipra-ui/app/html/help/articles.html +++ b/vipra-ui/app/html/help/articles.html @@ -7,50 +7,46 @@ </tr> <tr> <td><kbd>2</kbd></td> - <td>Article menu dropdown</td> + <td>Article excerpt text</td> </tr> <tr> <td><kbd>3</kbd></td> - <td>Article excerpt text</td> + <td>Article topics with topic menu dropdowns</td> </tr> <tr> <td><kbd>4</kbd></td> - <td>Article topics with topic menu dropdowns</td> + <td>Article menu</td> </tr> <tr> <td><kbd>5</kbd></td> - <td>Page number</td> - </tr> - <tr> - <td><kbd>6</kbd></td> <td>Article date</td> </tr> <tr> - <td><kbd>7</kbd></td> + <td><kbd>6</kbd></td> <td>Article topic count</td> </tr> <tr> - <td><kbd>8</kbd></td> + <td><kbd>7</kbd></td> <td>Article details dropdown</td> </tr> <tr> - <td><kbd>9</kbd></td> + <td><kbd>8</kbd></td> <td>Pagination</td> </tr> <tr> - <td><kbd>10</kbd></td> + <td><kbd>9</kbd></td> <td>Filter articles by name</td> </tr> <tr> - <td><kbd>11</kbd></td> + <td><kbd>10</kbd></td> <td>Filter articles by initial of name</td> </tr> <tr> - <td><kbd>12</kbd></td> + <td><kbd>11</kbd></td> <td>Sort articles by various attributes, sort direction</td> </tr> <tr> - <td><kbd>13</kbd></td> + <td><kbd>12</kbd></td> <td>Filter articles by date range</td> </tr> </table> diff --git a/vipra-ui/app/html/help/articles.show.entities.html b/vipra-ui/app/html/help/articles.show.entities.html index 49ec6c07df9d3301a1897cb1a30980e37c3592d4..efc74cbc7fb68016ba1edc625c50c291d3bb8852 100644 --- a/vipra-ui/app/html/help/articles.show.entities.html +++ b/vipra-ui/app/html/help/articles.show.entities.html @@ -1,9 +1,33 @@ -<p></p> +<p>This view shows a sortable list of all entities that were discovered in this article. The entity distribution is shown in a column chart which is updated when more entities are loaded.</p> <table class="help-listing"> <tr> <td><kbd>1</kbd></td> - <td></td> + <td>Article title</td> + </tr> + <tr> + <td><kbd>2</kbd></td> + <td>Info tab</td> + </tr> + <tr> + <td><kbd>3</kbd></td> + <td>Entities tab</td> + </tr> + <tr> + <td><kbd>4</kbd></td> + <td>Words tab</td> + </tr> + <tr> + <td><kbd>5</kbd></td> + <td>Network link with current article as start node</td> + </tr> + <tr> + <td><kbd>6</kbd></td> + <td>Entity distribution, filtered by shown entities</td> + </tr> + <tr> + <td><kbd>7</kbd></td> + <td>Entities list</td> </tr> </table> diff --git a/vipra-ui/app/html/help/articles.show.html b/vipra-ui/app/html/help/articles.show.html index 544589a321ccae548b0ac4487587a9a622542329..e16ffd9f0193046fd40de82a9e8b635e7e76f39b 100644 --- a/vipra-ui/app/html/help/articles.show.html +++ b/vipra-ui/app/html/help/articles.show.html @@ -23,10 +23,14 @@ </tr> <tr> <td><kbd>6</kbd></td> - <td>Topic share of this article</td> + <td>Info table</td> </tr> <tr> <td><kbd>7</kbd></td> + <td>Topic share of this article</td> + </tr> + <tr> + <td><kbd>8</kbd></td> <td>Similar articles of this article</td> </tr> </table> diff --git a/vipra-ui/app/html/help/articles.show.words.html b/vipra-ui/app/html/help/articles.show.words.html index 178ccccb73094c58c8c3a43b27c1ee25189182a0..7544fa9a3ac85ecd7396ccdb36ba02c1413bca26 100644 --- a/vipra-ui/app/html/help/articles.show.words.html +++ b/vipra-ui/app/html/help/articles.show.words.html @@ -1,9 +1,33 @@ -<p></p> +<p>This view shows a sortable list of all words that were discovered in this article. The word distribution is shown in a column chart which is updated when more words are loaded.</p> <table class="help-listing"> <tr> <td><kbd>1</kbd></td> - <td></td> + <td>Article title</td> + </tr> + <tr> + <td><kbd>2</kbd></td> + <td>Info tab</td> + </tr> + <tr> + <td><kbd>3</kbd></td> + <td>Entities tab</td> + </tr> + <tr> + <td><kbd>4</kbd></td> + <td>Words tab</td> + </tr> + <tr> + <td><kbd>5</kbd></td> + <td>Network link with article as start node</td> + </tr> + <tr> + <td><kbd>6</kbd></td> + <td>Words distribution, filtered by shown words</td> + </tr> + <tr> + <td><kbd>7</kbd></td> + <td>Words list</td> </tr> </table> diff --git a/vipra-ui/app/html/help/entities.html b/vipra-ui/app/html/help/entities.html index 948f327efcce694c1f0ab9d63d1848a874a0d135..56754c1e01733846d18200c559cd85755b138eb8 100644 --- a/vipra-ui/app/html/help/entities.html +++ b/vipra-ui/app/html/help/entities.html @@ -7,7 +7,7 @@ </tr> <tr> <td><kbd>2</kbd></td> - <td>Entity menu dropdown</td> + <td>Entity menu</td> </tr> <tr> <td><kbd>3</kbd></td> diff --git a/vipra-ui/app/html/help/entities.show.articles.html b/vipra-ui/app/html/help/entities.show.articles.html index 44ffbf35bbe566a8a9d3f0f30a21d4fd523cdcc6..84cf7ddce4bad576818ce7da64a0aa58e12f8a62 100644 --- a/vipra-ui/app/html/help/entities.show.articles.html +++ b/vipra-ui/app/html/help/entities.show.articles.html @@ -1,9 +1,41 @@ -<p></p> +<p>This view shows a sortable list of all articles that are associated with this entity. Each article links to a detailed view, the downward triangle shows the article menu for that article, articles are also annotated with the date that they were published on, the topic count and a detail dropdown that shows an excerpt of the article's text and the topic names with links and topic menus. The number of articles is limited, a paginator will be shown if more articles exist.<p> <table class="help-listing"> <tr> <td><kbd>1</kbd></td> - <td></td> + <td>Entity name</td> + </tr> + <tr> + <td><kbd>2</kbd></td> + <td>Info tab</td> + </tr> + <tr> + <td><kbd>3</kbd></td> + <td>Articles tab</td> + </tr> + <tr> + <td><kbd>4</kbd></td> + <td>Sort articles by various attributes</td> + </tr> + <tr> + <td><kbd>5</kbd></td> + <td>Article link with entity menu dropdown</td> + </tr> + <tr> + <td><kbd>6</kbd></td> + <td>Article date</td> + </tr> + <tr> + <td><kbd>7</kbd></td> + <td>Article topic count</td> + </tr> + <tr> + <td><kbd>8</kbd></td> + <td>Article details dropdown</td> + </tr> + <tr> + <td><kbd>9</kbd></td> + <td>Pagination</td> </tr> </table> diff --git a/vipra-ui/app/html/help/entities.show.html b/vipra-ui/app/html/help/entities.show.html index 73bc41c05113f2f836761e397ef50c0e88ccb6c0..08e3feb74cf794ee14efad5671b27934c65e8d48 100644 --- a/vipra-ui/app/html/help/entities.show.html +++ b/vipra-ui/app/html/help/entities.show.html @@ -15,7 +15,7 @@ </tr> <tr> <td><kbd>4</kbd></td> - <td>Entity types</td> + <td>Info table</td> </tr> </table> diff --git a/vipra-ui/app/html/help/explorer.html b/vipra-ui/app/html/help/explorer.html index 3b402b6caafb0e03eb3f05f1b0bd7851cef58182..882e682e4c4a787a5e43715137bd98bb81fc8814 100644 --- a/vipra-ui/app/html/help/explorer.html +++ b/vipra-ui/app/html/help/explorer.html @@ -39,14 +39,26 @@ </tr> <tr> <td><kbd>10</kbd></td> - <td>Selected topics for refined analysis</td> + <td>Time range selector</td> </tr> <tr> <td><kbd>11</kbd></td> - <td>Topic words, sorted by importance</td> + <td>Selected topics for refined analysis</td> </tr> <tr> <td><kbd>12</kbd></td> + <td>Word evolution tab</td> + </tr> + <tr> + <td><kbd>13</kbd></td> + <td>Articles tab</td> + </tr> + <tr> + <td><kbd>14</kbd></td> + <td>Topic words, sorted by importance</td> + </tr> + <tr> + <td><kbd>15</kbd></td> <td>Word evolution chart of selected words</td> </tr> </table> diff --git a/vipra-ui/app/html/help/network.html b/vipra-ui/app/html/help/network.html index 1207e60321e8fb8b317d2ea65532aaa101036d8b..dd3f98f5317261a89bd91ece18dec45e58f46f6e 100644 --- a/vipra-ui/app/html/help/network.html +++ b/vipra-ui/app/html/help/network.html @@ -1,3 +1,5 @@ +<p>This view shows a network representation of the topics, articles and words that are stored for this topic model. The items are shown with different node shapes and their relations are shown as links between these nodes. The top left shows a filter box in which the shown nodes can be limited and filtered. By clicking on a node, its relations are loaded and related nodes are rendered. A quick view of an article's contents is shown when selecting an article node. To enter an item, double click the node.</p> + <table class="help-listing"> <tr> <td><kbd>1</kbd></td> @@ -5,40 +7,52 @@ </tr> <tr> <td><kbd>2</kbd></td> - <td>Highlight neighbors on node selection, load node relations on click</td> + <td>Panel collapse toggle</td> </tr> <tr> <td><kbd>3</kbd></td> - <td>Filter visible nodes by name</td> + <td>Highlight neighbors on node selection, load node relations on click</td> </tr> <tr> <td><kbd>4</kbd></td> - <td>Reset network to initial state</td> + <td>Filter visible nodes by name</td> </tr> <tr> <td><kbd>5</kbd></td> - <td>Zoom network to fit window</td> + <td>Reset network to initial state</td> </tr> <tr> <td><kbd>6</kbd></td> - <td>Pause/resume network physics simulation</td> + <td>Zoom network to fit window</td> </tr> <tr> <td><kbd>7</kbd></td> - <td>Load all non-loaded relations of visible nodes</td> + <td>Pause/resume network physics simulation</td> </tr> <tr> <td><kbd>8</kbd></td> - <td>Article details when selecting an article node</td> + <td>Load all non-loaded relations of visible nodes</td> </tr> <tr> <td><kbd>9</kbd></td> - <td>Article node, square</td> + <td>Article details when selecting an article node</td> </tr> <tr> <td><kbd>10</kbd></td> + <td>Article node, square</td> + </tr> + <tr> + <td><kbd>11</kbd></td> <td>Topic node, triangle</td> </tr> + <tr> + <td><kbd>12</kbd></td> + <td>Topic node, second level</td> + </tr> + <tr> + <td><kbd>13</kbd></td> + <td>Topic node, third level</td> + </tr> </table> <div class="image"> diff --git a/vipra-ui/app/html/help/topics.html b/vipra-ui/app/html/help/topics.html index 2ff4966961f06f2c5275da99b00af5b8b0209565..8156d668d359d853e8bfcdab3539d1ee5b052b29 100644 --- a/vipra-ui/app/html/help/topics.html +++ b/vipra-ui/app/html/help/topics.html @@ -3,30 +3,26 @@ <table class="help-listing"> <tr> <td><kbd>1</kbd></td> - <td>Topic title</td> + <td>Topic title with topic menu dropdown</td> </tr> <tr> <td><kbd>2</kbd></td> - <td>Topic menu dropdown</td> + <td>Topic menu</td> </tr> <tr> <td><kbd>3</kbd></td> - <td>Topic article count</td> - </tr> - <tr> - <td><kbd>4</kbd></td> <td>Pagination</td> </tr> <tr> - <td><kbd>5</kbd></td> + <td><kbd>4</kbd></td> <td>Filter topics by name</td> </tr> <tr> - <td><kbd>6</kbd></td> + <td><kbd>5</kbd></td> <td>Filter topics by initial of name</td> </tr> <tr> - <td><kbd>7</kbd></td> + <td><kbd>6</kbd></td> <td>Sort topics by various attributes, sort direction</td> </tr> </table> diff --git a/vipra-ui/app/html/help/topics.show.articles.html b/vipra-ui/app/html/help/topics.show.articles.html index ad48e9db1eddbd035e104567d141d60ede4b13e7..47ccb5c3dd4ea659f2da3823aa08020983872e4d 100644 --- a/vipra-ui/app/html/help/topics.show.articles.html +++ b/vipra-ui/app/html/help/topics.show.articles.html @@ -1,9 +1,45 @@ -<p></p> +<p>This view shows a sortable list of all articles that are associated with this topic. Each article links to a detailed view, the downward triangle shows the article menu for that article, articles are also annotated with the date that they were published on, the topic count and a detail dropdown that shows an excerpt of the article's text and the topic names with links and topic menus. The number of articles is limited, a paginator will be shown if more articles exist.<p> <table class="help-listing"> <tr> <td><kbd>1</kbd></td> - <td></td> + <td>Topic name</td> + </tr> + <tr> + <td><kbd>2</kbd></td> + <td>Info tab</td> + </tr> + <tr> + <td><kbd>3</kbd></td> + <td>Sequences tab</td> + </tr> + <tr> + <td><kbd>4</kbd></td> + <td>Articles tab</td> + </tr> + <tr> + <td><kbd>5</kbd></td> + <td>Network link with article as start node</td> + </tr> + <tr> + <td><kbd>6</kbd></td> + <td>Sort articles by various attributes</td> + </tr> + <tr> + <td><kbd>7</kbd></td> + <td>Article date</td> + </tr> + <tr> + <td><kbd>8</kbd></td> + <td>Article topic count</td> + </tr> + <tr> + <td><kbd>9</kbd></td> + <td>Article details dropdown toggle</td> + </tr> + <tr> + <td><kbd>10</kbd></td> + <td>Article link with article menu dropdown toggle</td> </tr> </table> diff --git a/vipra-ui/app/html/help/topics.show.html b/vipra-ui/app/html/help/topics.show.html index 5f071b616a110e96fd4795bab5acf96dfd6ff096..01ea27e00e57d6e428f53121d28921d795602140 100644 --- a/vipra-ui/app/html/help/topics.show.html +++ b/vipra-ui/app/html/help/topics.show.html @@ -41,6 +41,10 @@ <td><kbd>10</kbd></td> <td>Topic relevance chart limited to this topic</td> </tr> + <tr> + <td><kbd>11</kbd></td> + <td>Time range selector</td> + </tr> </table> <div class="image"> diff --git a/vipra-ui/app/html/help/topics.show.sequences.html b/vipra-ui/app/html/help/topics.show.sequences.html index de7036685e78fd6a636ac8d42cd395dde1416373..58d8c55dec9aa60123f37c7f734a323144aeda33 100644 --- a/vipra-ui/app/html/help/topics.show.sequences.html +++ b/vipra-ui/app/html/help/topics.show.sequences.html @@ -1,9 +1,41 @@ -<p></p> +<p>This view shows the top words of the sequences of this topic. A sequence is a time window in the whole time span defined by the window resolution. The sequence can be chosen from the dropdown. To compare to sequences to each other, a second sequence can be chosen. To abort the comparison, click on the x button.</p> <table class="help-listing"> <tr> <td><kbd>1</kbd></td> - <td></td> + <td>Topic name, can be renamed by selecting Actions > Rename</td> + </tr> + <tr> + <td><kbd>2</kbd></td> + <td>Info tab</td> + </tr> + <tr> + <td><kbd>3</kbd></td> + <td>Sequences tab</td> + </tr> + <tr> + <td><kbd>4</kbd></td> + <td>Articles tab</td> + </tr> + <tr> + <td><kbd>5</kbd></td> + <td>Network link with article as start node</td> + </tr> + <tr> + <td><kbd>6</kbd></td> + <td>Sequence selector</td> + </tr> + <tr> + <td><kbd>7</kbd></td> + <td>Comparison column</td> + </tr> + <tr> + <td><kbd>8</kbd></td> + <td>Comparison sequence selector</td> + </tr> + <tr> + <td><kbd>9</kbd></td> + <td>Stop comparing</td> </tr> </table> diff --git a/vipra-ui/app/html/help/words.show.articles.html b/vipra-ui/app/html/help/words.show.articles.html index 1d4ad7eafae7a9c5a7536c23a001d22a43f705fd..f62cde790cde2521ed0807837375f5a2a9ae6e0b 100644 --- a/vipra-ui/app/html/help/words.show.articles.html +++ b/vipra-ui/app/html/help/words.show.articles.html @@ -1,9 +1,41 @@ -<p></p> +<p>This view shows a sortable list of all articles that are associated with this word. Each article links to a detailed view, the downward triangle shows the article menu for that article, articles are also annotated with the date that they were published on, the topic count and a detail dropdown that shows an excerpt of the article's text and the topic names with links and topic menus. The number of articles is limited, a paginator will be shown if more articles exist.<p> <table class="help-listing"> <tr> <td><kbd>1</kbd></td> - <td></td> + <td>Entity name</td> + </tr> + <tr> + <td><kbd>2</kbd></td> + <td>Info tab</td> + </tr> + <tr> + <td><kbd>3</kbd></td> + <td>Topics tab</td> + </tr> + <tr> + <td><kbd>4</kbd></td> + <td>Articles tab</td> + </tr> + <tr> + <td><kbd>5</kbd></td> + <td>Sort articles by various attributes</td> + </tr> + <tr> + <td><kbd>6</kbd></td> + <td>Article link with article menu dropdown toggle</td> + </tr> + <tr> + <td><kbd>7</kbd></td> + <td>Article date</td> + </tr> + <tr> + <td><kbd>8</kbd></td> + <td>Article topic count</td> + </tr> + <tr> + <td><kbd>9</kbd></td> + <td>Article details dropdown toggle</td> </tr> </table> diff --git a/vipra-ui/app/html/help/words.show.html b/vipra-ui/app/html/help/words.show.html index a9999523469e2c444cbabcecb6a5db34992f1c1f..68bbd995be9f72a593ce0690454edace54095bd8 100644 --- a/vipra-ui/app/html/help/words.show.html +++ b/vipra-ui/app/html/help/words.show.html @@ -17,6 +17,10 @@ <td><kbd>4</kbd></td> <td>Articles tab</td> </tr> + <tr> + <td><kbd>5</kbd></td> + <td>Info table</td> + </tr> </table> <div class="image"> diff --git a/vipra-ui/app/html/help/words.show.topics.html b/vipra-ui/app/html/help/words.show.topics.html index 118a82b0783b8a190eaa68d4b8dc2c8242577b61..5381295b8d791800edcebc2b19eb944f2ffc189f 100644 --- a/vipra-ui/app/html/help/words.show.topics.html +++ b/vipra-ui/app/html/help/words.show.topics.html @@ -1,9 +1,37 @@ -<p></p> +<p>This view shows a sortable list of all topics that are associated with this word. Each topic links to a detailed view, the downward triangle shows the topic menu for that topic. The number of topics is limited, a paginator will be shown if more topics exist.<p> <table class="help-listing"> <tr> <td><kbd>1</kbd></td> - <td></td> + <td>Entity name</td> + </tr> + <tr> + <td><kbd>2</kbd></td> + <td>Info tab</td> + </tr> + <tr> + <td><kbd>3</kbd></td> + <td>Topics tab</td> + </tr> + <tr> + <td><kbd>4</kbd></td> + <td>Articles tab</td> + </tr> + <tr> + <td><kbd>5</kbd></td> + <td>Sort topics by various attributes</td> + </tr> + <tr> + <td><kbd>6</kbd></td> + <td>Topic link with topic menu dropdown toggle</td> + </tr> + <tr> + <td><kbd>7</kbd></td> + <td>Topic article count</td> + </tr> + <tr> + <td><kbd>8</kbd></td> + <td>Pagination</td> </tr> </table> diff --git a/vipra-ui/app/img/ui-word-hover.png b/vipra-ui/app/img/ui-word-hover.png index 94bf1b9e4dddf5903bd661146077342839134d5b..f708c6e45dba71ad6ca55ff02861d9ae55baef51 100644 Binary files a/vipra-ui/app/img/ui-word-hover.png and b/vipra-ui/app/img/ui-word-hover.png differ diff --git a/vipra-ui/app/img/ui-word-topics-hover.png b/vipra-ui/app/img/ui-word-topics-hover.png index 03e86c60d992b859f41534844084b04069b78a03..955487bfb379384fbef468b69b8c69a6109a8645 100644 Binary files a/vipra-ui/app/img/ui-word-topics-hover.png and b/vipra-ui/app/img/ui-word-topics-hover.png differ diff --git a/vipra-ui/app/js/alerter.js b/vipra-ui/app/js/alerter.js index 6e9c1e589f2e6eb379729a69d09c6b1f848c1e60..fff29de758c6a5149a2aeb72acb27d47f838e3f9 100644 --- a/vipra-ui/app/js/alerter.js +++ b/vipra-ui/app/js/alerter.js @@ -98,24 +98,24 @@ return c; }; - Alerter.prototype.showSuccess = function(title, msg, opts) { - return this.showAlert('success', title, msg, opts); + Alerter.prototype.showSuccess = function() { + return this.$alert(this, 'success', arguments); }; - Alerter.prototype.showInfo = function(title, msg, opts) { - return this.showAlert('info', title, msg, opts); + Alerter.prototype.showInfo = function() { + return this.$alert(this, 'info', arguments); }; - Alerter.prototype.showWarning = function(title, msg, opts) { - return this.showAlert('warning', title, msg, opts); + Alerter.prototype.showWarning = function() { + return this.$alert(this, 'warning', arguments); }; - Alerter.prototype.showDanger = function(title, msg, opts) { - return this.showAlert('danger', title, msg, opts); + Alerter.prototype.showDanger = function() { + return this.$alert(this, 'danger', arguments); }; - Alerter.prototype.showPrimary = function(title, msg, opts) { - return this.showAlert('primary', title, msg, opts); + Alerter.prototype.showPrimary = function() { + return this.$alert(this, 'primary', arguments); }; Alerter.prototype.unqueueAlert = function() { @@ -264,6 +264,24 @@ return this; }; + /** + * Private functions + */ + + Alerter.prototype.$alert = function(type, args) { + if(!args || !args.length) + throw 'not enough arguments'; + if(args && args.length == 1) + return this.showAlert(type, null, args[0]); + if(args && args.length == 2) { + if(typeof args[1] === 'object') + return this.showAlert(type, null, args[0], args[1]); + else + return this.showAlert(type, args[0], args[1]); + } + return this.showAlert(type, args[0], args[1], args[2]); + }; + /** * Singleton */ diff --git a/vipra-ui/app/js/controllers.js b/vipra-ui/app/js/controllers.js index 1a62abdb7a5e881500039743ce703b41d9d7d3b1..b39b4bed23639b979c5ab5be1bb08e88ec07976e 100644 --- a/vipra-ui/app/js/controllers.js +++ b/vipra-ui/app/js/controllers.js @@ -1708,7 +1708,7 @@ function($scope, $state, $stateParams, ArticleFactory) { $scope.checkTopicModel('entities.show.articles', function() { - $scope.entity = $stateParams.id; + $scope.id = $stateParams.id; $scope.rootModels.title = $scope.entity; $scope.entitiesArticlesModels = { @@ -1725,7 +1725,7 @@ limit: $scope.entitiesArticlesModels.limit, sort: ($scope.entitiesArticlesModels.sortdir ? '' : '-') + $scope.entitiesArticlesModels.sortkey, topicModel: $scope.rootModels.topicModel.id, - entity: $scope.entity + entity: $scope.id }, function(data, headers) { $scope.articles = data; $scope.articlesTotal = headers("V-Total"); diff --git a/vipra-util/src/main/java/de/vipra/util/ConsoleUtils.java b/vipra-util/src/main/java/de/vipra/util/ConsoleUtils.java index 94c8931b67dcc6a4e8e8d8f3cb3c3dce03a4f8aa..dfd2015797a5922e33418086c03f754b93d58369 100644 --- a/vipra-util/src/main/java/de/vipra/util/ConsoleUtils.java +++ b/vipra-util/src/main/java/de/vipra/util/ConsoleUtils.java @@ -124,7 +124,7 @@ public class ConsoleUtils { message += " [" + def + "]"; message += ": "; while (true) { - System.out.print(message); + infoNOLF(message); try { final String line = in.readLine(); if (line.isEmpty() && def != null) @@ -161,7 +161,7 @@ public class ConsoleUtils { message += " [" + def + "]"; message += ": "; while (true) { - System.out.print(message); + infoNOLF(message); try { final String line = in.readLine(); if (line.isEmpty() && def != null) @@ -194,7 +194,7 @@ public class ConsoleUtils { final BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); message += ": "; while (true) { - System.out.print(message); + infoNOLF(message); try { final String line = in.readLine(); if (line.isEmpty()) { @@ -224,7 +224,7 @@ public class ConsoleUtils { message += " [" + def + "]"; message += ": "; while (true) { - System.out.print(message); + infoNOLF(message); try { final String line = in.readLine(); final T value = EnumUtils.searchEnum(enumClass, line); @@ -244,7 +244,7 @@ public class ConsoleUtils { message += " [" + def + "]"; message += ": "; while (true) { - System.out.print(message); + infoNOLF(message); try { final String line = in.readLine().toLowerCase().trim(); if (line.equals("true") || line.equals("yes") || line.equals("1") || line.equals("on") || line.equals("enable") diff --git a/vipra-util/src/main/java/de/vipra/util/model/TopicModelConfig.java b/vipra-util/src/main/java/de/vipra/util/model/TopicModelConfig.java index 7acef4d7f991afc98ac6aab08a9617d8578faff0..24b46afd4234dfbcf14e559301a5a70690cece72 100644 --- a/vipra-util/src/main/java/de/vipra/util/model/TopicModelConfig.java +++ b/vipra-util/src/main/java/de/vipra/util/model/TopicModelConfig.java @@ -91,7 +91,7 @@ public class TopicModelConfig implements Serializable { return group; } - public void setGroup(String group) { + public void setGroup(final String group) { this.group = group; } diff --git a/vipra-util/src/main/java/de/vipra/util/model/TopicModelFull.java b/vipra-util/src/main/java/de/vipra/util/model/TopicModelFull.java index 623f839688e88d2a1c9c586712eb5edc08d306f6..95847a7904bbc8b14b1704164b14186fa2afa36c 100644 --- a/vipra-util/src/main/java/de/vipra/util/model/TopicModelFull.java +++ b/vipra-util/src/main/java/de/vipra/util/model/TopicModelFull.java @@ -85,7 +85,7 @@ public class TopicModelFull implements Model<ObjectId>, Comparable<TopicModelFul public void setName(final String name) { if (name != null && name.contains(":")) { final String[] parts = name.split(":"); - this.group = parts[0]; + group = parts[0]; this.name = parts[1]; } else this.name = name; @@ -95,7 +95,7 @@ public class TopicModelFull implements Model<ObjectId>, Comparable<TopicModelFul return group; } - public void setGroup(String group) { + public void setGroup(final String group) { this.group = group; }