Open onsa opened 4 years ago
Looks fine to me:
[{"":"m","singular":"f","plural":"n"},{"":"infinitive","singular":"być","plural":"być"},{"":"1st","singular":"jestem,\n -m","plural":"jestem,\n -m"},{"":"2nd","singular":"jesteś, -ś","plural":"jesteś, -ś"},{"":"3rd","singular":"jest","plural":"jest"},{"":"1st","singular":"byłem","plural":"byłam"},{"":"2nd","singular":"byłeś","plural":"byłaś"},{"":"3rd","singular":"był","plural":"była"},{"":"1st","singular":"będę","plural":"będę"},{"":"2nd","singular":"będziesz","plural":"będziesz"},{"":"3rd","singular":"będzie","plural":"będzie"},{"":"1st","singular":"byłbym","plural":"byłabym"},{"":"2nd","singular":"byłbyś","plural":"byłabyś"},{"":"3rd","singular":"byłby","plural":"byłaby"},{"":"1st","singular":"niech będę","plural":"niech będę"},{"":"2nd","singular":"bądź","plural":"bądź"},{"":"3rd","singular":"niech będzie","plural":"niech będzie"},{"":"active adjectival participle","singular":"będący","plural":"będąca"},{"":"contemporary adverbial participle","singular":"będąc","plural":"będąc"},{"":"anterior adverbial participle","singular":"bywszy","plural":"bywszy"},{"":"verbal noun","singular":"bycie","plural":"bycie"}]
The template does this:
var table = $('#students').tableToJSON();
alert(JSON.stringify(table));
which means - it only converts tables with the ID of students
. Put an ID on your table element and try again.
Thanks.
It does parse now, that is into this:
[
{
"": "m",
"singular": "f",
"plural": "n"
},
{
"": "infinitive",
"singular": "być",
"plural": "być"
},
{
"": "1st",
"singular": "jestem,\n -m",
"plural": "jestem,\n -m"
},
{
"": "2nd",
"singular": "jesteś, -ś",
"plural": "jesteś, -ś"
},
{
"": "3rd",
"singular": "jest",
"plural": "jest"
},
{
"": "1st",
"singular": "byłem",
"plural": "byłam"
},
{
"": "2nd",
"singular": "byłeś",
"plural": "byłaś"
},
{
"": "3rd",
"singular": "był",
"plural": "była"
},
{
"": "1st",
"singular": "będę",
"plural": "będę"
},
{
"": "2nd",
"singular": "będziesz",
"plural": "będziesz"
},
{
"": "3rd",
"singular": "będzie",
"plural": "będzie"
},
{
"": "1st",
"singular": "byłbym",
"plural": "byłabym"
},
{
"": "2nd",
"singular": "byłbyś",
"plural": "byłabyś"
},
{
"": "3rd",
"singular": "byłby",
"plural": "byłaby"
},
{
"": "1st",
"singular": "niech będę",
"plural": "niech będę"
},
{
"": "2nd",
"singular": "bądź",
"plural": "bądź"
},
{
"": "3rd",
"singular": "niech będzie",
"plural": "niech będzie"
},
{
"": "active adjectival participle",
"singular": "będący",
"plural": "będąca"
},
{
"": "contemporary adverbial participle",
"singular": "będąc",
"plural": "będąc"
},
{
"": "anterior adverbial participle",
"singular": "bywszy",
"plural": "bywszy"
},
{
"": "verbal noun",
"singular": "bycie",
"plural": "bycie"
}
]
So there are lots of empty keys (where <th>
tags are parsed) and some of the <th>
s are lost altogether (e.g. present indicative
, past indicative
, etc.). Am I still missing something?
Cheers!
I just looked at the HTML more closely @onsa - I don't think this tool can work with this type of table. There are way too many <th>
spread throughout the table within different rows for it to work with this tool.
I tried parsing the table below copied from Wiktionary (https://en.wiktionary.org/wiki/by%C4%87) via the Plunker Template. The preview looked correct but once I hit the
Convert!
button, the alert window displayed only[]
.