[Kde-pim] KNotes issues

Andreas Hartmetz ahartmetz at gmail.com
Wed Aug 1 16:22:45 BST 2007


>
> Use cases:
> 1) user types in free-form data and we need to guess if they entered
> valid richtext.  In which case we must use a heuristic.  We could write
> our own heuristic so we can "learn as we go".
>
Normal users don't just write HTML tags on a note and expect the computer to 
interpret the HTML at some point - and when do you start interpreting it? 
When the note is saved and loaded again? That is something that can be done, 
but nothing that should ever be done.

> 2) user first selects "rich text" mode.  just like in the kmail composer
> when the user does html composing.  In this case we can simply
> surround the entered data with "<qt>data</qt>".  Then we reading
> that data back in a simple heuristic will detect it as richtext.
>
> 3) we read an incidence with data generated from a non-KDE PIM app.
> Again, we'll need to guess.
>
> 4) ??
>
> Do we really want to have X-KDE-RICHTEXT-DESCRIPTION,
> X-KDE-RICHTEXT-SUMMARY, X-KDE-RICHTEXT-LOCATION, etc flags?
>
> So.. my idea is to have our own isRichText() method.  Initially it would
> simply use Qt::mightBeRichText(). But we could make it smarter as we go.
>
We shouldn't implement machine learning to solve a problem can be solved by a 
boolean flag. In the few cases that a source of text doesn't "know" which 
format it is it's still possible to use mightBeRichText() to set the flag 
once and be done with it.
I think we can take spam filters as an example for heuristics involving text. 
They contain quite some code, and they are not perfect. And they don't give 
the same results on different installations.

Cheers,
Andreas
-- 
- So where'd you park the car, Max?
- I don't know. I couldn't see over the wheel.
- That's okay. I can smell it.
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/



More information about the kde-pim mailing list