[Script Info] Title: [Events] Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text Dialogue: 0,0:00:00.15,0:00:04.85,Default,,0000,0000,0000,,Hi. This is an introduction to \Nthe language tool rule editor. Dialogue: 0,0:00:05.44,0:00:08.91,Default,,0000,0000,0000,,LanguageTool is an open source \Nstyle and grammar checker. Dialogue: 0,0:00:09.19,0:00:13.89,Default,,0000,0000,0000,,It finds errors by searching a text \Nfor error patterns. Dialogue: 0,0:00:14.72,0:00:18.05,Default,,0000,0000,0000,,This rule editor lets you \Nwrite those error patterns. Dialogue: 0,0:00:18.80,0:00:22.45,Default,,0000,0000,0000,,In other words, if you know \Nhow to use this rule editor, Dialogue: 0,0:00:22.52,0:00:24.91,Default,,0000,0000,0000,,you can help make the LanguageTool \Nmore powerful. Dialogue: 0,0:00:29.41,0:00:31.27,Default,,0000,0000,0000,,I'll now show you how to use it. Dialogue: 0,0:00:32.45,0:00:35.39,Default,,0000,0000,0000,,First, make sure the correct language is set. Dialogue: 0,0:00:36.06,0:00:40.46,Default,,0000,0000,0000,,Now, you need to think of a specific error\Nthat you want LanguageTool to detect Dialogue: 0,0:00:41.76,0:00:45.94,Default,,0000,0000,0000,,Think of a sentence with this error\Nand enter it to the wrong sentence field. Dialogue: 0,0:00:48.49,0:00:50.37,Default,,0000,0000,0000,,For this example, I'll use the error: Dialogue: 0,0:00:50.48,0:00:52.14,Default,,0000,0000,0000,,"Sorry for my bed [sic] English" Dialogue: 0,0:00:52.14,0:00:54.44,Default,,0000,0000,0000,,where "bad" is misspelt (as "bed") Dialogue: 0,0:00:55.78,0:00:58.18,Default,,0000,0000,0000,,I will also enter the correct version\Nof this sentence Dialogue: 0,0:00:58.58,0:01:00.31,Default,,0000,0000,0000,,into the corrected sentence field Dialogue: 0,0:01:01.49,0:01:02.85,Default,,0000,0000,0000,,Click on the button. Dialogue: 0,0:01:03.40,0:01:06.99,Default,,0000,0000,0000,,A new section opens where we can\Nspecify the error pattern. Dialogue: 0,0:01:07.51,0:01:09.68,Default,,0000,0000,0000,,But first, the rule editor lets you know\N Dialogue: 0,0:01:09.68,0:01:13.16,Default,,0000,0000,0000,,that LanguageTool already finds\Nthe error in our example sentence. Dialogue: 0,0:01:14.35,0:01:18.18,Default,,0000,0000,0000,,As this is just an example,\NI will ignore this message. Dialogue: 0,0:01:20.52,0:01:23.45,Default,,0000,0000,0000,,Now comes the main part – the error pattern. Dialogue: 0,0:01:25.62,0:01:29.84,Default,,0000,0000,0000,,You can see in initial error patterns\Njust one word: "bed". Dialogue: 0,0:01:30.57,0:01:33.40,Default,,0000,0000,0000,,But "bed" itself is a correct word. Dialogue: 0,0:01:34.52,0:01:36.33,Default,,0000,0000,0000,,If our pattern only contained this word, Dialogue: 0,0:01:37.30,0:01:40.43,Default,,0000,0000,0000,,LanguageTool would complain about\Nany sentence with the word "bed". Dialogue: 0,0:01:41.38,0:01:43.15,Default,,0000,0000,0000,,That's obviously not useful at all. Dialogue: 0,0:01:44.31,0:01:48.74,Default,,0000,0000,0000,,What I want is to say that "bed" is only\Nwrong in specific contexts. Dialogue: 0,0:01:50.40,0:01:53.84,Default,,0000,0000,0000,,In this case, it is only wrong\Nfollowed by the word "English", Dialogue: 0,0:01:54.47,0:01:57.07,Default,,0000,0000,0000,,so i click the "add token to pattern" link Dialogue: 0,0:01:58.33,0:02:00.82,Default,,0000,0000,0000,,and here I add the word "English". Dialogue: 0,0:02:02.98,0:02:04.72,Default,,0000,0000,0000,,This pattern will now match all sentences Dialogue: 0,0:02:04.72,0:02:09.78,Default,,0000,0000,0000,,where the word "bed" with an "e"\Nis directly followed by the word "English". Dialogue: 0,0:02:12.14,0:02:13.85,Default,,0000,0000,0000,,I will try out the rule now. Dialogue: 0,0:02:14.51,0:02:16.32,Default,,0000,0000,0000,,For that, I give the rule a name. Dialogue: 0,0:02:18.25,0:02:23.16,Default,,0000,0000,0000,,This name is what a user of LanguageTool\Nwill see in the configuration dialogue, Dialogue: 0,0:02:24.22,0:02:25.56,Default,,0000,0000,0000,,and I'll add a message. Dialogue: 0,0:02:26.88,0:02:30.72,Default,,0000,0000,0000,,This is what the LanguageTool user will see\Nif the rule matches a sentence. Dialogue: 0,0:02:31.69,0:02:33.94,Default,,0000,0000,0000,,So it should be a short helpful text. Dialogue: 0,0:02:35.15,0:02:38.75,Default,,0000,0000,0000,,I'll put single quotes ('') around the\Ncorrect word to mark it as a suggestion. Dialogue: 0,0:02:39.83,0:02:44.23,Default,,0000,0000,0000,,The other fields are optional and we'll\Nleave them just blank for now. Dialogue: 0,0:02:45.15,0:02:47.93,Default,,0000,0000,0000,,Now when clicking the \N"evaluate error pattern button" Dialogue: 0,0:02:48.49,0:02:50.28,Default,,0000,0000,0000,,both my example sentences get checked Dialogue: 0,0:02:51.26,0:02:57.12,Default,,0000,0000,0000,,plus a few thousand other test sentences,\Nfor example from Wikipedia. Dialogue: 0,0:02:59.52,0:03:01.43,Default,,0000,0000,0000,,Everything is ok so far Dialogue: 0,0:03:01.71,0:03:05.38,Default,,0000,0000,0000,,and the rule editor displays the snippet\Nof XML code. Dialogue: 0,0:03:06.74,0:03:10.11,Default,,0000,0000,0000,,This is the code that LanguageTool needs\Nto use your rule. Dialogue: 0,0:03:11.52,0:03:15.43,Default,,0000,0000,0000,,If you think your rule is useful for\Nfuture versions of LanguageTool, Dialogue: 0,0:03:15.84,0:03:17.03,Default,,0000,0000,0000,,please send it to the developers. Dialogue: 0,0:03:18.08,0:03:20.52,Default,,0000,0000,0000,,There's a link here with contact information. Dialogue: 0,0:03:22.79,0:03:26.36,Default,,0000,0000,0000,,Now let's have a look at what happens\Nif your rule doesn't quite work. Dialogue: 0,0:03:27.87,0:03:31.18,Default,,0000,0000,0000,,Assume for example your rule\Nwas only one word: Dialogue: 0,0:03:31.92,0:03:33.11,Default,,0000,0000,0000,,"Bed" with an "e". Dialogue: 0,0:03:34.24,0:03:37.55,Default,,0000,0000,0000,,If I evaluate this rule, I get\Na lot of matches, Dialogue: 0,0:03:37.69,0:03:39.98,Default,,0000,0000,0000,,and these matches don't seem to have errors. Dialogue: 0,0:03:41.00,0:03:44.31,Default,,0000,0000,0000,,This is a clear sign that the pattern\Nis not strict enough Dialogue: 0,0:03:44.74,0:03:46.87,Default,,0000,0000,0000,,so one might want to add another word. Dialogue: 0,0:03:48.55,0:03:51.97,Default,,0000,0000,0000,,So for now, we've only looked at\Nmatching simple words. Dialogue: 0,0:03:52.91,0:03:57.45,Default,,0000,0000,0000,,But you can also match regular expressions\Nby clicking the "Regex" check box. Dialogue: 0,0:03:59.00,0:04:03.61,Default,,0000,0000,0000,,For example, match English or French\Nby using a pipe [ | ] symbol. Dialogue: 0,0:04:05.22,0:04:08.03,Default,,0000,0000,0000,,You can also match words by\Ntheir part of speech. Dialogue: 0,0:04:09.99,0:04:12.78,Default,,0000,0000,0000,,Click the "part of speech" radio button\Nand enter the text field. Dialogue: 0,0:04:14.32,0:04:19.79,Default,,0000,0000,0000,,For some languages, a help will show up about \Nthe parts of speech that can be addressed. Dialogue: 0,0:04:21.49,0:04:23.40,Default,,0000,0000,0000,,This help will tell you for example that\N Dialogue: 0,0:04:23.40,0:04:27.99,Default,,0000,0000,0000,,"NNP" is the code for singular proper\Nnouns in English. Dialogue: 0,0:04:32.89,0:04:34.33,Default,,0000,0000,0000,,If you evaluate the rule with this, Dialogue: 0,0:04:35.35,0:04:39.16,Default,,0000,0000,0000,,it will also work as the word "English"\Nis detected as a singular proper noun. Dialogue: 0,0:04:40.81,0:04:44.53,Default,,0000,0000,0000,,If you use a part of speech that doesn't\Nmatch, the rule editor will let you know. Dialogue: 0,0:04:45.31,0:04:49.42,Default,,0000,0000,0000,,Like this, you can see the part of speech\Nof the example sentence here. Dialogue: 0,0:04:51.98,0:04:54.70,Default,,0000,0000,0000,,So this was our short introduction\Nto the rule editor. Dialogue: 0,0:04:55.52,0:04:59.54,Default,,0000,0000,0000,,We hope you use it to create new error\Npatterns to make LanguageTool more powerful. Dialogue: 0,0:05:00.84,0:05:04.30,Default,,0000,0000,0000,,If you have questions, feel free\Nto contact us on the forum. Dialogue: 0,0:05:04.56,0:05:07.25,Default,,0000,0000,0000,,You can find the link on LanguageTool.org\N(https://languagetool.org/) Dialogue: 0,0:05:07.28,0:05:09.00,Default,,0000,0000,0000,,This video was subtitled by safetex@ymail.com