Retourner vers la vidéo

LanguageTool Rule Editor Introduction

  • 0:00 - 0:05
    Hi. This is an introduction to
    the language tool rule editor.
  • 0:05 - 0:09
    LanguageTool is an open source
    style and grammar checker.
  • 0:09 - 0:14
    It finds errors by searching a text
    for error patterns.
  • 0:15 - 0:18
    This rule editor lets you
    write those error patterns.
  • 0:19 - 0:22
    In other words, if you know
    how to use this rule editor,
  • 0:23 - 0:25
    you can help make the LanguageTool
    more powerful.
  • 0:29 - 0:31
    I'll now show you how to use it.
  • 0:32 - 0:35
    First, make sure the correct language is set.
  • 0:36 - 0:40
    Now, you need to think of a specific error
    that you want LanguageTool to detect
  • 0:42 - 0:46
    Think of a sentence with this error
    and enter it to the wrong sentence field.
  • 0:48 - 0:50
    For this example, I'll use the error:
  • 0:50 - 0:52
    "Sorry for my bed [sic] English"
  • 0:52 - 0:54
    where "bad" is misspelt (as "bed")
  • 0:56 - 0:58
    I will also enter the correct version
    of this sentence
  • 0:59 - 1:00
    into the corrected sentence field
  • 1:01 - 1:03
    Click on the button.
  • 1:03 - 1:07
    A new section opens where we can
    specify the error pattern.
  • 1:08 - 1:10
    But first, the rule editor lets you know
  • 1:10 - 1:13
    that LanguageTool already finds
    the error in our example sentence.
  • 1:14 - 1:18
    As this is just an example,
    I will ignore this message.
  • 1:21 - 1:23
    Now comes the main part – the error pattern.
  • 1:26 - 1:30
    You can see in initial error patterns
    just one word: "bed".
  • 1:31 - 1:33
    But "bed" itself is a correct word.
  • 1:35 - 1:36
    If our pattern only contained this word,
  • 1:37 - 1:40
    LanguageTool would complain about
    any sentence with the word "bed".
  • 1:41 - 1:43
    That's obviously not useful at all.
  • 1:44 - 1:49
    What I want is to say that "bed" is only
    wrong in specific contexts.
  • 1:50 - 1:54
    In this case, it is only wrong
    followed by the word "English",
  • 1:54 - 1:57
    so i click the "add token to pattern" link
  • 1:58 - 2:01
    and here I add the word "English".
  • 2:03 - 2:05
    This pattern will now match all sentences
  • 2:05 - 2:10
    where the word "bed" with an "e"
    is directly followed by the word "English".
  • 2:12 - 2:14
    I will try out the rule now.
  • 2:15 - 2:16
    For that, I give the rule a name.
  • 2:18 - 2:23
    This name is what a user of LanguageTool
    will see in the configuration dialogue,
  • 2:24 - 2:26
    and I'll add a message.
  • 2:27 - 2:31
    This is what the LanguageTool user will see
    if the rule matches a sentence.
  • 2:32 - 2:34
    So it should be a short helpful text.
  • 2:35 - 2:39
    I'll put single quotes ('') around the
    correct word to mark it as a suggestion.
  • 2:40 - 2:44
    The other fields are optional and we'll
    leave them just blank for now.
  • 2:45 - 2:48
    Now when clicking the
    "evaluate error pattern button"
  • 2:48 - 2:50
    both my example sentences get checked
  • 2:51 - 2:57
    plus a few thousand other test sentences,
    for example from Wikipedia.
  • 3:00 - 3:01
    Everything is ok so far
  • 3:02 - 3:05
    and the rule editor displays the snippet
    of XML code.
  • 3:07 - 3:10
    This is the code that LanguageTool needs
    to use your rule.
  • 3:12 - 3:15
    If you think your rule is useful for
    future versions of LanguageTool,
  • 3:16 - 3:17
    please send it to the developers.
  • 3:18 - 3:21
    There's a link here with contact information.
  • 3:23 - 3:26
    Now let's have a look at what happens
    if your rule doesn't quite work.
  • 3:28 - 3:31
    Assume for example your rule
    was only one word:
  • 3:32 - 3:33
    "Bed" with an "e".
  • 3:34 - 3:38
    If I evaluate this rule, I get
    a lot of matches,
  • 3:38 - 3:40
    and these matches don't seem to have errors.
  • 3:41 - 3:44
    This is a clear sign that the pattern
    is not strict enough
  • 3:45 - 3:47
    so one might want to add another word.
  • 3:49 - 3:52
    So for now, we've only looked at
    matching simple words.
  • 3:53 - 3:57
    But you can also match regular expressions
    by clicking the "Regex" check box.
  • 3:59 - 4:04
    For example, match English or French
    by using a pipe [ | ] symbol.
  • 4:05 - 4:08
    You can also match words by
    their part of speech.
  • 4:10 - 4:13
    Click the "part of speech" radio button
    and enter the text field.
  • 4:14 - 4:20
    For some languages, a help will show up about
    the parts of speech that can be addressed.
  • 4:21 - 4:23
    This help will tell you for example that
  • 4:23 - 4:28
    "NNP" is the code for singular proper
    nouns in English.
  • 4:33 - 4:34
    If you evaluate the rule with this,
  • 4:35 - 4:39
    it will also work as the word "English"
    is detected as a singular proper noun.
  • 4:41 - 4:45
    If you use a part of speech that doesn't
    match, the rule editor will let you know.
  • 4:45 - 4:49
    Like this, you can see the part of speech
    of the example sentence here.
  • 4:52 - 4:55
    So this was our short introduction
    to the rule editor.
  • 4:56 - 5:00
    We hope you use it to create new error
    patterns to make LanguageTool more powerful.
  • 5:01 - 5:04
    If you have questions, feel free
    to contact us on the forum.
  • 5:05 - 5:07
    You can find the link on LanguageTool.org
    (https://languagetool.org/)
  • 5:07 - 5:09
    This video was subtitled by safetex@ymail.com
Titre:
LanguageTool Rule Editor Introduction
Description:

plus » « moins
Langue de la vidéo:
English
Durée:
05:09

sous-titres en English

Révisions Comparer les révisions