This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function prepareWordListWithSuggestions(phrase = '', suggestions = []) { | |
const result = []; | |
let phraseAux = phrase; | |
let phrasePointer = 0; | |
suggestions.forEach((suggestion) => { | |
const start = suggestion.start - phrasePointer; | |
const end = suggestion.offset - phrasePointer; | |
const firstPart = phraseAux.slice(0, start); | |
if (firstPart !== '') { | |
result.push({ phrase: firstPart }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div class="input--field"> | |
<p class="input--field-label box--spelling-label" :class="{ active: isActive }"> | |
{{ label }} | |
<span v-if="obligatory" class="text--color-red">*</span> | |
</p> | |
<template v-if="!hasFocus && value === ''"> | |
<p class="placeholder">{{ placeholder }}</p> | |
</template> | |
<div |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function parseHtmlToText(html) { | |
const element = html.cloneNode(true); | |
const spans = element.getElementsByClassName('suggestions'); | |
while (spans.length > 0) { | |
spans[0].parentNode.removeChild(spans[0]); | |
} | |
let text = element.textContent.split('\n').join(''); | |
text = text.trimStart(); | |
text = text.replace(/ +/g, ' '); | |
return text; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div class="input--field"> | |
<p class="input--field-label" :class="{ active: isActive }"> | |
{{ label }} | |
</p> | |
<template v-if="!hasFocus && value === ''"> | |
<p class="placeholder">{{ placeholder }}</p> | |
</template> | |
<div | |
ref="editable" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<span class="suggestions--block"> | |
<ul v-if="showSuggestions" class="suggestions" contentEditable="false"> | |
<li class="suggestions--close" @click="handleClose"> | |
<icon-close /> | |
</li> | |
<li v-for="suggestion in suggestions" | |
:key="suggestion.value"> | |
<p @click="handleSelectSuggestion(word, suggestion.value)"> | |
{{ suggestion.value }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div class="input--field"> | |
<p class="input--field-label"> | |
{{ label }} | |
</p> | |
<template v-if="!hasFocus && value === ''"> | |
<p class="placeholder">{{ placeholder }}</p> | |
</template> | |
<div> | |
{{value}} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="https://cdn.jsdelivr.net/npm/@tensorflow/[email protected]"> </script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3.5" | |
services: | |
postgres: | |
image: library/postgres:10.7 | |
container_name: db | |
restart: always | |
volumes: | |
- postgres_data:/var/lib/postgresql/data | |
environment: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:latest | |
RUN apt-get update -y | |
RUN apt-get install -y python-pip python-dev build-essential | |
COPY . /app | |
WORKDIR /app | |
RUN pip install -r requirements.txt | |
ENTRYPOINT ["python"] | |
CMD ["app.py"] |
NewerOlder