Skip to content
This repository has been archived by the owner on Nov 10, 2022. It is now read-only.

Merge words, add words, delete words #11

Open
jwilk opened this issue Feb 16, 2014 · 6 comments
Open

Merge words, add words, delete words #11

jwilk opened this issue Feb 16, 2014 · 6 comments

Comments

@jwilk
Copy link
Member

jwilk commented Feb 16, 2014

Issue reported by kempelen at Bitbucket:

Hi Jakub,

Very useful editing features could be implemented on the word tree part. I list with keys, because as I can see there is no right-click menu on those. (Corresponding Edit -> Text submenus would be needed. But those could be "main menu" in Edit menu to save some clicks, also the current sub-submenus could be simply directly in "Edit" with separator lines, instead being second level submenus, which is inconvenient for so few menus.)

  • "Del" key could delete the selected word
  • "Ins" key could insert a word after the current one (user will need to adjust the box of course, but a default box could be added, based on coordinates of the previous word)
  • "m" key could merge the current word with the next word, creating a bounding rectangle from min-max of the two words.

Similar features could work on "line" and "para" - at least the delete.

And there could be a feature to make a box fit to contained items. E.g. I could make the line fit to contained words' min-max X/Y, and then the para and column too.

What do you think? I would really like to help with these, but I don't know Python and I don't understand the source code that I checked. :-(

Thanks,
Ferenc

@jwilk
Copy link
Member Author

jwilk commented Mar 15, 2014

Comment submitted by kempelen at Bitbucket:

Jakub,
Meanwhile I've implemented a similar tool that includes these features.
It's not as easy like djvusmooth because I made it as web app, it requires to export data to XML and images to PNG. But it already contains most of the above mentioned features and looks similar to DjVuSmooth. I'll let you know when it's ready if you are interested.

@jwilk
Copy link
Member Author

jwilk commented Apr 11, 2014

Comment submitted by kempelen at Bitbucket:

Hi Jakub, my editor that can do the features listed above is here: http://sourceforge.net/projects/webdjvutexted/

@jwilk
Copy link
Member Author

jwilk commented Apr 11, 2014

Comment submitted by @jsbien:

I think your editor would have much more users if it used hOCR instead of DjVu-specific XML (I hope you are familiar with Jakub Wilk's DjVu hOCR utilities).

@jwilk
Copy link
Member Author

jwilk commented Apr 12, 2014

Comment submitted by kempelen at Bitbucket:

Hi Janusz, no, I didn't know djvu2hocr and hocr2djvu, thank you! hOCR format looks too complicated (or better said too loosely, too freely defined!), than the very strict DjVu XML, so does the hOCR output from Jakub's tools.

DjVu XML format has strict structure, and the JavaScript tree editor used in my program (jstree.com) allows to define a rigid structure that the user cannot break, so these things work perfect together. I don't really see a chance to support a much more flexible structure like HTML+hOCR. :-( If someone wants to create DjVu as final output, hOCR is not a useful step, unless he plans to keep the more advanced markup, headings, tables, etc for other purposes - that DjVu cannot store.

Thank you, Ferenc

@jwilk
Copy link
Member Author

jwilk commented Apr 13, 2014

Comment submitted by @jsbien:

You are right that the format is loosely defined, so we treat the output of djvu2hocr as the reference :-)

hOCR is output in particular by ocrodjvu, so the workflow would be straightforward, but I understand your reasons.

No time yet to test your program, but I will do it in a week or so.

Regards

Janusz

@jwilk
Copy link
Member Author

jwilk commented May 9, 2014

Unfortunately, I don't have time to implement any new features in djvusmooth.
Code contributions from other people are of course welcome.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

No branches or pull requests

1 participant