Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions uce.portal/resources/templates/corpus/corpusInspector.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,17 @@
<a class="w-rounded-btn open-wiki-page" data-wid="${corpus.getWikiId()}" data-wcovered="${corpus.getName()}">
<i class="fab fa-wikipedia-w m-0 color-prime large-font"></i>
</a>
<div class="text-center pb-3">
<button class="btn btn-sm btn-outline-primary"
onclick="openUploadForExistingCorpora(
'${(corpus.getName()!"-")?js_string}',
'${(corpus.getAuthor()!"-")?js_string}',
'${(corpus.getLanguage()!"-")?js_string}',
'${(corpusConfig.getDescription()!"")?js_string}'
)">
<i class="fas fa-plus mr-1"></i> Upload files to this corpora
</button>
</div>
</div>

<div class="ccontent">
Expand Down
2 changes: 1 addition & 1 deletion uce.portal/resources/templates/css/document-reader.css
Original file line number Diff line number Diff line change
Expand Up @@ -776,7 +776,7 @@ body {
outline: none;
}

#vp-3, #vp-4, #vp-5, #vp-2, #vp-1 {
#vp-3, #vp-4, #vp-5, #vp-2, #vp-1, #vp-6 {
display: flex;
align-items: center;
justify-content: center;
Expand Down
4 changes: 4 additions & 0 deletions uce.portal/resources/templates/js/documentReader.js
Original file line number Diff line number Diff line change
Expand Up @@ -916,6 +916,10 @@ $(document).on('click', '.viz-nav-btn', function () {
setTimeout(() => renderSentenceTopicSankey('vp-5'), 500);

}
if (target === '#viz-panel-6') {
setTimeout(() => renderTemporalExplorer('vp-6'), 500);

}
});


Expand Down
314 changes: 309 additions & 5 deletions uce.portal/resources/templates/landing-page.ftl

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions uce.portal/resources/templates/reader/documentReaderView.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,9 @@
<div class="viz-panel" id="viz-panel-5">
<div id="vp-5" ></div>
</div>
<div class="viz-panel" id="viz-panel-6">
<div id="vp-6" ></div>
</div>
</div>

<div class="viz-bottom-nav">
Expand All @@ -323,6 +326,7 @@
<button class="viz-nav-btn" data-target="#viz-panel-3">${languageResource.get("topicLandscape")}</button>
<button class="viz-nav-btn" data-target="#viz-panel-4">${languageResource.get("topicSimilarity")}</button>
<button class="viz-nav-btn" data-target="#viz-panel-5">${languageResource.get("sentenceTopicFlow")}</button>
<button class="viz-nav-btn" data-target="#viz-panel-6">${languageResource.get("sentenceSentiment")}</button>
</div>

</div>
Expand Down
27 changes: 26 additions & 1 deletion uce.portal/resources/templates/wiki/analysisResultFragment.ftl
Original file line number Diff line number Diff line change
@@ -1,4 +1,23 @@
<#if analysisId??>
<div class="mb-3" style="display:flex; align-items:center; gap:8px;">
<button id="saveCasBtn" data-analysis-id="${analysisId}" class="btn btn-primary">Save CAS</button>
</div>

<script>
document.getElementById("saveCasBtn").addEventListener("click", function () {
const analysisId = this.dataset.analysisId;
const corpusId = document.getElementById("corpus-select").selectedOptions[0].dataset.id
fetch(
"/api/analysis/importCas?analysisId=" + encodeURIComponent(analysisId) +
"&corpusId=" + encodeURIComponent(corpusId),
{method: "POST"}
)
.then(r => r.text())
.then(msg => alert("Server response: " + msg))
.catch(err => alert("Error: " + err));
});
</script>
</#if>
<#if DUUI??>
<#if DUUI.modelGroups?has_content>
<#if DUUI.isTopic>
Expand All @@ -7,7 +26,10 @@
<div class="analysis-topics-container">
<#list DUUI.textInformation.topicAVG as model>
<div class="analysis-topic-card">
<div class="analysis-topic-card-title">${model.getModelInfo().getName()}</div>
<div class="analysis-topic-card-title d-flex align-items-center justify-content-between">
<span>${model.getModelInfo().getName()}</span>
<button type="button" class="btn btn-outline-primary btn-sm topic-visualize-btn">Visualize</button>
</div>
<div class="analysis-topics-grid">
<#list model.topics as topic>
<#assign opacity = topic.getScore()?string?replace(",", ".")>
Expand All @@ -16,6 +38,9 @@
</div>
</#list>
</div>
<div class="topic-chart-wrapper" style="display:none;">
<div class="topic-chart" style="width:100%;height:420px;"></div>
</div>
</div>
</#list>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,8 @@ public JCas getLanguage(String inputText) throws Exception {

public JCas getSentences(JCas cas) throws Exception {
HashMap<String, String> spacyUrls = new HashMap<>();
spacyUrls.put("Spacy", "http://spacy-cohmetrix.service.component.duui.texttechnologylab.org");
// spacyUrls.put("Spacy", "http://spacy.service.component.duui.texttechnologylab.org");
// spacyUrls.put("Spacy", "http://spacy-cohmetrix.service.component.duui.texttechnologylab.org");
spacyUrls.put("Spacy", "http://spacy.service.component.duui.texttechnologylab.org");
spacyUrls.put("Syntok", "http://paragraph-syntok.service.component.duui.texttechnologylab.org/");
DUUIComposer composer = setListComposer(spacyUrls);
cas = runPipeline(cas, composer);
Expand Down
Loading