-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Annotation tool with another languages #49
Comments
Tried. Not working. There are a lot of sticking words. OKEY. I find the solution: Replace this code on line 143: <span class="wtoken">
<span :id="item.tkid"
:class="TokenClass(item)"
v-for="(item, index) in PageArrays.rvarr"
v-on:click="_.size(item.tk.trim())==0 ? void(0) : TokenHighlight(event.target, PageArrays.rvarr, item, index)"
v-if="item.tk.trim()!==''"
:key="item.tkid">{{index==0 ? item.tk : !item.tk.match(/\p{P}/gu) ? ' ' + item.tk : item.tk}}</span>
</span> With this: <span class="wtoken">
<span :id="item.tkid"
:class="TokenClass(item)"
v-for="(item, index) in PageArrays.rvarr"
v-if="item.tk.trim() !== ''"
v-on:click="_.size(item.tk.trim()) === 0 ? false : TokenHighlight(event.target, PageArrays.rvarr, item, index)"
:key="item.tkid">
{{ index === 0 ? item.tk : (!item.tk.match(/[^\w\s]/g) ? ' ' : '') + item.tk }}
</span>
</span> Then, if needed to save file without sticking:
sentence = (v.map((v, i) => i == 0 || v.tk == "" ? v.tk : !v.tk.match(/\p{P}/gu) ? ' ' + v.tk : v.tk)).join(""); with this: sentence = (v.map((v, i) => i == 0 || v.tk == "" ? v.tk : !v.tk.match(/[^\w\s]/g) ? ' ' : ' ' + v.tk)).join("");
sentence = (temp.map((v, i) => i == 0 || v.tkFinal == "" ? v.tkFinal : !v.tkFinal.match(/\p{P}/gu) ? ' ' + v.tkFinal : v.tkFinal)).join(""); with this: sentence = (temp.map((v, i) => i == 0 || v.tkFinal == "" ? v.tkFinal : !v.tkFinal.match(/[^\w\s]/g) ? ' ' : ' ' + v.tkFinal)).join("");
return i == 0 || v.tk == "" ? v.tk : !v.tk.match(/\p{P}/gu) ? ' ' + v.tk : v.tk; with this: return i == 0 || v.tk == "" ? v.tk : !v.tk.match(/[^\w\s]/g) ? ' ' : ' ' + v.tk; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello @yangheng95 and team!
Trying to annotate my own data to fine-tuning by
ABSADatasetPrepareTool.html
v.2.0 or https://pyabsa.pages.dev/, but having some issues:Cannot annotate with another language (Russian) - words just stick together.
There is an example on screenshot by tool -
безопасноститоже.
- like this, must beбезопасности тоже.
And by https://pyabsa.pages.dev/ -
Here is better, but I cannot annotate words. Only full text.
What should I do?
P.S.
Thanks a lot for your great work by PyABSA!
The text was updated successfully, but these errors were encountered: