This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Spelling according to the keyboard layout

19

Votes
56
37
Tags: spell check, multiple languages spell check, multiple languages spell check, multiple languages
(comma "," separated)
User avatar
alin
Registered Member
Posts
9
Karma
0
OS
These days it happens to type in more than one language. I would like kde apps to spell according to the language that I type.

One way of doing that would be to change the spell checker according to the keyboard layout used.

Alin


_____________________________________________________________________
Without Questions there are no Answers!
_____________________________________________________________________
Olivier_CRR
Registered Member
Posts
21
Karma
0
OS
This can be convenient in some situations, but in my case I use a French keyboard, but I type exclusively in English ...it should not be mandatory or default.
User avatar
RGB
Registered Member
Posts
346
Karma
0
OS
With the Spanish layout you can type on almost any European language: I use it for Italian, English, (something like) French and for (some words I search on) German.
And, of course, for Spanish ;)


RGB, proud to be a member of KDE forums since 2008-Nov.
And proud to be a kde user since 1.1.2
groszdani
Registered Member
Posts
10
Karma
0
OS
I think too that this is not a real solution to the problem since many people prefer using the layout of their keyboard whatever language they type. E. g. non-English people write often in English but English letters are present on every Latin script keyboard.

Maybe a better approach would be a statistical one: if the majority of the words (in the current paragraph, after at least ~15 words are typed) are wrong according to the current dictionary, check them against every dictionary (in the background of course) and if with a dictionary much less words appear wrong, switch to that dictionary.
User avatar
alin
Registered Member
Posts
9
Karma
0
OS
My fault they are two ideas in one

1. We should be able to spell in kde and apps in more than one language

2. How should we do that.... choosing the speller according to the current layout.

This idea is more for 1 rather than second. That is just my thought on how to do 1. I would like people to say how to do it, rather than giving examples of misuse of keyboard...

Alin


_____________________________________________________________________
Without Questions there are no Answers!
_____________________________________________________________________
User avatar
Hans
Administrator
Posts
3304
Karma
24
OS
I would say that 2. is a solution to 1., and I interpreted it as the actual idea.

Sonnet[1] was supposed to provide automatic language detection, but as far as I know it's not actively developed anymore.

[1] http://en.wikipedia.org/wiki/Sonnet_(KDE)


Problem solved? Please click on "Accept this answer" below the post with the best answer to mark your topic as solved.

10 things you might want to do in KDE | Open menu with Super key | Mouse shortcuts
User avatar
RGB
Registered Member
Posts
346
Karma
0
OS
The Spanish layout have most, if not all, the characters from Portuguese, French, Italian, German (and possibly others) languages, why do you consider it use a "misuse" to write in all those languages?
IMHO, the best way in which spell-check can be handled is the way used by OOo Writer: you define the language in the paragraph and character styles and by applying those styles you have each part of your text spelled in the right language. Of course, the use of styles is overkilling in apps like konqueror or kwrite, but IMO those apps are not for complex layouts: if you need to control your text to a high extent, write it in a word processor and then (if needed) copy/paste it into the web browser.


RGB, proud to be a member of KDE forums since 2008-Nov.
And proud to be a kde user since 1.1.2
User avatar
alin
Registered Member
Posts
9
Karma
0
OS
RGB

layout for inputing text looks different in different languages for a simple reason: They try to optimise the typing effort in that language. (remember someone telling me that the different arrangements are done in order to minimise the finger movement when typing with respect to the rest position --- personally I am skeptical about this).
Correct way of introducing text in a certain language is to use the right language layout. When I type a lot in Italian I prefer the Italian layout over the British one. much simpler to press one key over using a combination of dead keys...

The fact that you are used with a certain method of introducing text does not make it the right one. For simple tasks I use the same system as you, my default layout to type.

What I want to see in KDE4 is the ability to spell more than one language and be able to easily switch.
Iirc correctly, I have not use Windows systems for years now, linking the layout of the keyboard with the spelling was implemented in windows. Of course, in the spirit of the freedom, the user should be allowed to overwrite this decision.

spelling is/should be enabled for any text input, so your oo model cannot really apply.
I hope you realise that is ridiculous your suggestion of writing in a word processor and then paste in a web browser.

Alin


_____________________________________________________________________
Without Questions there are no Answers!
_____________________________________________________________________
User avatar
RGB
Registered Member
Posts
346
Karma
0
OS
But the point is: the differences between those layouts are minimal because most of them are only slight variations of qwerty. The difference between Spanish (or Italian, or Portuguese) and English layout are mainly in those characters not used by English layouts: accented characters.
(OK, French layout is different: they use aserty instead of qwerty ;) and of course you cannot use the Spanish layout to write in Russian)
And "being used to" IS a good point: as I said before, if you use a Spanish layout you do not need to change it in order to write in another European language, and that means you do not need to learn another layout. You just write.
Of course it is not a good idea to use a British layout to write in Italian, but there is no problem in using an Italian layout to write in English: most of the characters you need are in the same position.
And after all, Spanish is the second most spoken language(1): with that layout you cover a huge percentage of mankind ;)

(1) http://en.wikipedia.org/wiki/List_of_la ... e_speakers


RGB, proud to be a member of KDE forums since 2008-Nov.
And proud to be a kde user since 1.1.2
envalin
Registered Member
Posts
146
Karma
-1
OS
I think this would be an interesting option to have, but I think it may be more useful (and simple to program) to simply add a "Language" docker in KOffice that you could drag on. This could potentially have the ability to switch the keyboard layout and dictionary language.
envalin
Registered Member
Posts
146
Karma
-1
OS
I think this would be an interesting option to have, but I think it may be more useful (and simple to program) to simply add a "Language" docker in KOffice that you could drag on. This could potentially have the ability to switch the keyboard layout and dictionary language.
Warbo
Registered Member
Posts
13
Karma
0
I'm not sure what approach Sonnet used/uses, but there is a very simple and elegant way to detect which language something is written in, which could be used instead of the keyboard layout.

First, get LOADS of text in different languages. Then compress each language's text using a compression algorithm which "learns" (ie. optimises its Huffman tree), see Wikipedia if you don't know what this is :) The result is a bunch of compression programs, one for each language, which is REALLY good for the language it was trained on, but not as good for any of the others. This only has to be done once, so they can come bundled pre-trained with KDE. Now, if you want to know what language a piece of text is written in you simply have to compress it with each of the compression programs, and whichever one gives you the best compression corresponds to the text's language (ie. Italian will be compressed best by the compressor trained with Italian). Doing the compression doesn't take long, since it will only be a bit of text, and the more you write the better it can guess the language.
userinScotland
Registered Member
Posts
14
Karma
0
OS
envalin wrote:I think this would be an interesting option to have, but I think it may be more useful (and simple to program) to simply add a "Language" docker in KOffice that you could drag on. This could potentially have the ability to switch the keyboard layout and dictionary language.

This is similar to an idea I had (but not yet submitted) for KOffice, so +1 here.
yehielb
Registered Member
Posts
23
Karma
0
OS
great idea, I need this many times in Kmail, writing in both English and Hebrew.
for the almost identical layouts you could probably add fake layouts, meaning you switch layout but actually use the same mapping as one or another one as you wish.
xErath
Registered Member
Posts
14
Karma
0
OS
Using keyboard layout for spellchecking is just a really bad idea. I have portuguese or norwegian layout's enabled, but always type either portuguese or english.

Instead, the user should specify a set of languages commonly used in SystemSettings>Locale, and then the spellchecker should auto detect language (choose the language that causes less spelling errors). Also, there ought to be some options in the context menu, like in popular web browsers.


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Sogou [Bot], Yahoo [Bot]