Merge branch 'master' of gitlab.com:patek-devs/res-judicata
This commit is contained in:
commit
6a0747410e
@ -254,6 +254,7 @@ export default {
|
||||
if (!this.hasZastoupeni) {
|
||||
this.zaloba.zalobci[0].zastoupeni = null
|
||||
}
|
||||
this.zaloba.datum = this.zaloba.datum.toLocaleDateString('cs-CZ')
|
||||
console.log("a")
|
||||
/* eslint-disable no-debugger */
|
||||
//debugger
|
||||
|
@ -1,11 +1,13 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="container is-flex is-align-items-center is-flex-direction-column">
|
||||
<form action="." method="POST" enctype="multipart/form-data" @submit.prevent="processForm">
|
||||
<input id="file" type="file" name="file">
|
||||
<label>Label, jak <strike>zákon</strike> norma káže: <input id="file" type="file" name="file"></label>
|
||||
<input type="submit" value="Submit">
|
||||
</form>
|
||||
<div id="content"></div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style>
|
||||
@ -17,6 +19,17 @@
|
||||
}
|
||||
</style>
|
||||
|
||||
<style scoped>
|
||||
#content {
|
||||
margin-top: 5rem;
|
||||
overflow: scroll;
|
||||
}
|
||||
|
||||
.container {
|
||||
max-height: 100vh;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
// @ is an alias to /src
|
||||
|
||||
@ -35,6 +48,7 @@ export default {
|
||||
console.log(passed);
|
||||
|
||||
const content = document.getElementById("content");
|
||||
content.innerHTML = "";
|
||||
let i = 0;
|
||||
for (const detection of passed) {
|
||||
const span1 = document.createElement("span");
|
||||
@ -43,7 +57,7 @@ export default {
|
||||
|
||||
const titles = {
|
||||
"court": "Označení soudu",
|
||||
"date_and_place": "Datum a čas sepsání",
|
||||
"date_and_place": "Datum a místo sepsání",
|
||||
};
|
||||
|
||||
const span2 = document.createElement("span");
|
||||
|
@ -56,18 +56,18 @@ def validate_court(text_content: str) -> Union[Tuple[int, int], Literal[False]]:
|
||||
return match.span()
|
||||
|
||||
def validate_accuser(text_content) -> Union[Tuple[int, int], Literal[False]]:
|
||||
pass
|
||||
return False
|
||||
|
||||
# hard to implement
|
||||
def validate_topic(text_content) -> Union[Tuple[int, int], Literal[False]]:
|
||||
pass
|
||||
return False
|
||||
|
||||
# also hard to implement
|
||||
def validate_intent(text_content) -> Union[Tuple[int, int], Literal[False]]:
|
||||
pass
|
||||
return False
|
||||
|
||||
def validate_signature(text_content) -> Union[Tuple[int, int], Literal[False]]:
|
||||
pass
|
||||
return False
|
||||
|
||||
date_and_place_pat = re.compile(r"\bve?\s+[^\n]+(?:\s|[.,\-–—:])+(?:dne)?(?:\s|[.,\-–—:])+\d+\.", flags=re.IGNORECASE)
|
||||
def validate_date_and_place(text_content: str) -> Union[Tuple[int, int], Literal[False]]:
|
||||
@ -82,6 +82,10 @@ def validate(text_content: str) -> object:
|
||||
"checks": {
|
||||
"court": validate_court(text_content),
|
||||
"date_and_place": validate_date_and_place(text_content),
|
||||
"accuser": validate_accuser(text_content),
|
||||
"topic": validate_topic(text_content),
|
||||
"intent": validate_intent(text_content),
|
||||
"signature": validate_signature(text_content),
|
||||
},
|
||||
"parsed_content": text_content,
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user