Bug 403222 - Pattern matching / natural language parsing in e-mail for dynamic event creation - part one.
authorRobert Brand <mozrob@googlemail.com>
Fri, 12 Jul 2013 17:53:55 +0200
changeset 3366 9ab8f7331646cfa033b78de9246658988aa72c1b
parent 3365 853542a4bd35f9a7185f0bdafb2125a1b4cc64d0
child 3367 335380c60e0664ef545e812f4642c3878ff0bd6c
push id635
push userzbraniecki@mozilla.com
push dateMon, 16 Sep 2013 19:43:09 +0000
bugs403222
Bug 403222 - Pattern matching / natural language parsing in e-mail for dynamic event creation - part one.
calendar/chrome/calendar/calendar-extract.properties
new file mode 100644
--- /dev/null
+++ b/calendar/chrome/calendar/calendar-extract.properties
@@ -0,0 +1,294 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+# LOCALIZATION NOTE:
+# Strings here are used to create events and tasks with start and end times
+# based on email content.
+# None of the strings are displayed in the user interface.
+#
+# You don't have to fill all from.*, until.*, *.prefix and *.suffix patterns.
+# It's ok to leave some empty.
+# Please consider declensions and gender if your language has them.
+# Don't just translate directly. The number of variants doesn't have to be
+# the same as in en-US. All of 0, 1, 2, etc is allowed in patterns except alphabet.
+# patterns. You can and should add language specific variants.
+#
+# There are two different ways to find a start time text in email:
+# 1) it matches a from.* pattern and does not have end.prefix or end.suffix next to it
+# 2) it matches until.* pattern and has start.prefix or start.suffix next to it
+# Similar inverse logic applies to end times.
+# These rules enable using prefix and suffix values with only start.* or only until.*
+# patterns localized for some languages and thus not having to repeat the same
+# values in both.
+#
+# Patterns are partially space-insensitive.
+# "deadline is" pattern will find both "deadlineis" and "deadline  is"
+# but "deadlineis" won't find "deadline is" or "deadline  is".
+# Therefore you should include all spaces that are valid within a pattern.
+
+# LOCALIZATION NOTE (start.prefix):
+# datetimes with these in front are extracted as start times
+# can be a list of values, separate variants by |
+start.prefix = von | vom | ab | zwischen | beginnt | beginnt um | beginnt gegen
+
+# LOCALIZATION NOTE (start.suffix):
+# datetimes followed by these are extracted as start times
+start.suffix = bis | - | bis um | bis zum | bis gegen | und
+
+# LOCALIZATION NOTE (end.prefix):
+# datetimes followed by these are extracted as end times
+end.prefix = bis | - | bis um | bis zum | bis gegen | und | fällig: | Fällig: | fällig | endet | endet um | endet gegen | Deadline ist der | Deadline ist um | Deadline:
+
+# LOCALIZATION NOTE (end.suffix):
+# datetimes followed by these are extracted as end times
+# can be a list of values, separate variants by |
+end.suffix =
+
+# LOCALIZATION NOTE (no.datetime.prefix):
+# datetimes with these in front won't be used
+# specify full words here
+no.datetime.prefix = letzte Woche | Email | E-Mail | außer | anstatt |anstatt des | anstelle | anstelle des | an Stelle des | > | unglücklicherweise | leider | nicht | Hausnummer | Kanal | Reihe | Flur | Etage | Stockwerk
+
+# LOCALIZATION NOTE (no.datetime.suffix):
+# datetimes follwed by these won't be used
+no.datetime.suffix = gesendet | geschickt | Hausnummer | Kanal | Reihe | Flur | Etage | Stockwerk | : | Email | E-Mail | > | % | USD | Dollars | EUR | Euro
+
+# LOCALIZATION NOTE (from.*):
+# can be a list of values, separate variants by |
+
+# LOCALIZATION NOTE (from.today):
+# must not be empty!
+from.today = heute
+
+from.tomorrow = morgen
+# LOCALIZATION NOTE (until.*):
+# can be a list of values, separate variants by |
+until.tomorrow =
+
+# LOCALIZATION NOTE (ordinal.date):
+# %1$S = matches numbers 1-31 and number.x
+# should not have "%1$S" as this would match any single number in email to a time
+from.ordinal.date = %1$Sst | %1$Snd | %1$Srd | %1$Sth | %1$S.
+
+# LOCALIZATION NOTE (until.ordinal.date):
+# %1$S = matches numbers 1-31 and number.x
+until.ordinal.date =
+
+from.noon = Mittag | mittags
+until.noon =
+
+# LOCALIZATION NOTE (hour.only):
+# %1$S = matches numbers 0-23 and number.0-number.23
+# should not have "%1$S" as this would match any single number in email to a time
+from.hour = um %1$S | gegen %1$S | von %1$S | von etwa %1$S | von ungefähr %1$S | ab %1$S | ab etwa %1$S | ab ungefähr %1$S | zwischen %1$S  | %1$S - | %1$S bis
+
+# LOCALIZATION NOTE (until.hour):
+# %1$S = matches numbers 0-23 and number.0-number.23
+# should also list how to find end of a timeframe
+until.hour = - %1$S | bis %1$S | bis etwa %1$S | bis ungefähr %1$S | und %1$S
+
+# LOCALIZATION NOTE (hour.only.am):
+# %1$S = matches numbers 0-23 and number.0-number.23
+from.hour.am = %1$S am | %1$S a.m
+
+# LOCALIZATION NOTE (until.hour.am):
+# %1$S = matches numbers 0-23 and number.0-number.23
+# should also list how to find end of a timeframe
+until.hour.am =
+
+# LOCALIZATION NOTE (hour.only.pm):
+# %1$S = matches numbers 0-23 and number.0-number.23
+from.hour.pm = %1$S pm | %1$S p.m | %1$S p
+
+# LOCALIZATION NOTE (until.hour.pm):
+# %1$S = matches numbers 0-23 and number.0-number.23
+# should also list how to find end of a timeframe
+until.hour.pm =
+
+# LOCALIZATION NOTE (from.half.hour.before):
+# denotes times 30 minutes before next full hour
+from.half.hour.before = halb %1$S
+
+# LOCALIZATION NOTE (until.half.hour.before):
+# denotes times 30 minutes before next full hour
+until.half.hour.before =
+
+# LOCALIZATION NOTE (from.half.hour.after):
+# denotes times 30 minutes after last full hour
+from.half.hour.after = %1$S Uhr dreißig | %1$S:30 Uhr
+
+# LOCALIZATION NOTE (until.half.hour.after):
+# denotes times 30 minutes after last full hour
+until.half.hour.after =
+
+# LOCALIZATION NOTE (hour.minutes):
+# %1$S = matches numbers 0-23
+# %2$S = matches numbers 0-59
+from.hour.minutes = %1$S:%2$S
+
+# LOCALIZATION NOTE (until.hour.minutes):
+# %1$S = matches numbers 0-23
+# %2$S = matches numbers 0-59
+until.hour.minutes = - %1$S:%2$S | bis %1$S:%2$S | und %1$S:%2$S
+
+# LOCALIZATION NOTE (hour.minutes.am):
+# %1$S = matches numbers 0-23
+# %2$S = matches numbers 0-59
+from.hour.minutes.am = %1$S:%2$S am | %1$S:%2$S a.m
+
+# LOCALIZATION NOTE (until.hour.minutes.am):
+# %1$S = matches numbers 0-23
+# %2$S = matches numbers 0-59
+until.hour.minutes.am =
+
+# LOCALIZATION NOTE (hour.minutes.pm):
+# %1$S = matches numbers 0-23
+# %2$S = matches numbers 0-59
+from.hour.minutes.pm = %1$S:%2$S pm | %1$S:%2$S p.m | %1$S:%2$S p
+
+# LOCALIZATION NOTE (until.hour.minutes.pm):
+# %1$S = matches numbers 0-23
+# %2$S = matches numbers 0-59
+until.hour.minutes.pm =
+
+# LOCALIZATION NOTE (monthname.day):
+# %1$S = matches numbers 1-31 and number.x
+# %2$S = matches monthname
+from.monthname.day = %1$S %2$S | %1$S. %2$S
+
+# LOCALIZATION NOTE (until.monthname.day):
+# %1$S = matches numbers 1-31
+# %2$S = matches monthname
+until.monthname.day = - %1$S %2$S | bis %1$S %2$S | und %1$S %2$S | - %1$S. %2$S | bis %1$S. %2$S | und %1$S. %2$S
+
+# LOCALIZATION NOTE (month.day):
+# %1$S = matches numbers 1-31
+# %2$S = matches numbers 1-12
+from.month.day = %2$S/%1$S | %1$S.%2$S.
+
+# LOCALIZATION NOTE (until.month.day):
+# %1$S = matches numbers 1-31 and number.x
+# %2$S = matches numbers 1-12
+until.month.day = - %1$S.%2$S. | bis %1$S.%2$S. | und %1$S.%2$S. | - %1$S %2$S. | bis %1$S %2$S. | und %1$S %2$S.
+
+# LOCALIZATION NOTE (year.month.day):
+# %1$S = matches numbers 1-31
+# %2$S = matches numbers 1-12
+# %3$S = matches 2/4 numbers
+from.year.month.day = %1$S/%2$S/%3$S | %3$S/%2$S/%1$S | %3$S-%2$S-%1$S | %3$S%2$S%1$S | %1$S.%2$S.%3$S | %1$S-%2$S-%3$S
+
+# LOCALIZATION NOTE (until.year.month.day):
+# %1$S = matches numbers 1-31
+# %2$S = matches numbers 1-12
+# %3$S = matches 2/4 numbers
+until.year.month.day = - %1$S/%2$S/%3$S | - %3$S/%2$S/%1$S | - %3$S-%2$S-%1$S | - %3$S%2$S%1$S | - %1$S.%2$S.%3$S | - %1$S-%2$S-%3$S | bis %1$S/%2$S/%3$S | bis %3$S/%2$S/%1$S | bis %3$S-%2$S-%1$S | bis %3$S%2$S%1$S | bis %1$S.%2$S.%3$S | bis %1$S-%2$S-%3$S |  und %1$S/%2$S/%3$S | und %3$S/%2$S/%1$S | und %3$S-%2$S-%1$S | und %3$S%2$S%1$S | und %1$S.%2$S.%3$S | und %1$S-%2$S-%3$S
+
+# LOCALIZATION NOTE (year.monthname.day):
+# %1$S = matches numbers 1-31
+# %2$S = matches monthname
+# %3$S = matches 2/4 numbers
+from.year.monthname.day = %1$S %2$S %3$S | %1$S. %2$S %3$S
+
+# LOCALIZATION NOTE (until.year.monthname.day):
+# %1$S = matches numbers 1-31
+# %2$S = matches monthname
+# %3$S = matches 2/4 numbers
+until.year.monthname.day = - %1$S %2$S %3$S | - %1$S. %2$S %3$S | bis %1$S %2$S %3$S | bis %1$S. %2$S %3$S | und %1$S %2$S %3$S | und %1$S. %2$S %3$S
+
+# LOCALIZATION NOTE (duration.*):
+# can be a list of values, separate variants by |
+
+# LOCALIZATION NOTE (duration.minutes):
+# %1$S = matches 1/2 numbers and number.0 - and number.31
+duration.minutes = %1$S Minuten | %1$S Min | %1$S Min. | %1$S min | %1$S mins
+
+# LOCALIZATION NOTE (duration.hours):
+# %1$S = matches 1/2 numbers and number.0 - and number.31
+duration.hours = %1$S Stunde | %1$S Stunden
+
+# LOCALIZATION NOTE (duration.days):
+# %1$S = matches 1/2 numbers and number.0 - and number.31
+duration.days = %1$S Tag | %1$S Tage | %1$S Tagen
+
+# LOCALIZATION NOTE (month.*):
+# can be a list of values, separate variants by |
+month.1 = Januar | Jan | Jan.
+month.2 = Februar | Feb | Feb.
+month.3 = März | Mär | Mär.
+month.4 = April | Apr | Apr.
+month.5 = Mai
+month.6 = Juni | Jun | Jun.
+month.7 = Juli | Jul | Jul.
+month.8 = August | Aug | Aug.
+month.9 = September | Sep | Sep. | Sept.
+month.10 = Oktober | Okt | Okt.
+month.11 = November | Nov | Nov.
+month.12 = Dezember | Dez | Dez.
+
+# LOCALIZATION NOTE (weekday.*):
+# used to derive start date based on weekdays mentioned
+# can be a list of values, separate variants by |
+# LOCALIZATION NOTE (weekday.0):
+# Regardless of what the first day of the week is in your country, 0 is Sunday here.
+from.weekday.0 = Sonntag | Sonntags | sonntags
+from.weekday.1 = Montag | Montags | montags
+from.weekday.2 = Dienstag | Dienstags | dienstags
+from.weekday.3 = Mittwoch | Mittwochs | mittwochs
+from.weekday.4 = Donnerstag | Donnerstags | donnerstags
+from.weekday.5 = Freitag | Freitags | freitags
+from.weekday.6 = Samstag | Samstags | samstags
+
+# LOCALIZATION NOTE (until.weekday.*):
+# used to derive end date based on weekdays mentioned
+# can be a list of values, separate variants by |
+# LOCALIZATION NOTE (until.weekday.0):
+# Regardless of what the first day of the week is in your country, 0 is Sunday here.
+until.weekday.0 = bis Sonntag | - Sonntag | und Sonntag | Sonntags | sonntags
+until.weekday.1 = bis Montag | - Montag | und Montag | Montags | montags
+until.weekday.2 = bis Dienstag | - Dienstag | und Dienstag | Dienstags | dienstags
+until.weekday.3 = bis Mittwoch | - Mittwoch | und Mittwoch | Mittwochs | mittwochs
+until.weekday.4 = bis Donnerstag | - Donnerstag | und Donnerstag | Donnerstags | donnerstags
+until.weekday.5 = bis Freitag | - Freitag | und Freitag | Freitags | freitags
+until.weekday.6 = bis Samstag | - Samstag | und Samstag | Samstags | samstags
+
+# LOCALIZATION NOTE (number.*):
+# used within other patterns to understand dates where day of month isn't written with digits
+# can be a list of values, separate variants by |
+number.0 = null
+number.1 = eine | einen | eins | erste | ersten | erstem
+number.2 = zwei | zweite | zweiten | zweitem
+number.3 = drei | dritte | dritten | drittem
+number.4 = vier | vierte | vierten | viertem
+number.5 = fünf | fünfte | fünften | fünftem
+number.6 = sechs | sechste | sechsten | sechstem
+number.7 = sieben | siebte | siebten | siebtem
+number.8 = acht | achte | achten | achtem
+number.9 = neun | neunte | neunten | neuntem
+number.10 = zehn | zehnte | zehnten | zehntem
+number.11 = elf | elfte | elften | elftem
+number.12 = zwölf | zwölfte | zwölften | zwölftem
+number.13 = dreizehn | dreizehnte | dreizehnten | dreizehntem
+number.14 = vierzehn | vierzehnte | vierzehnten | vierzehntem
+number.15 = fünfzehn | fünfzehnte | fünfzehnten | fünfzehntem
+number.16 = sechzehn | sechzehnte | sechzehnten | sechzehntem
+number.17 = siebzehn | siebzehnte | siebzehnten | siebzehntem
+number.18 = achtzehn | achtzehnte | achtzehnten | achtzehntem
+number.19 = neunzehn | neunzehnte | neunzehnten | neunzehntem
+number.20 = zwanzig | zwanzigste | zwanzigsten | zwanzigstem
+number.21 = einundzwanzig | einundzwanzigste | einundzwanzigsten | einundzwanzigstem
+number.22 = zweiundzwanzig | zweiundzwanzigste | zweiundzwanzigsten | zweiundzwanzigstem
+number.23 = dreiundzwanzig | dreiundzwanzigste | dreiundzwanzigsten | dreiundzwanzigstem
+number.24 = vierundzwanzig | vierundzwanzigste | vierundzwanzigsten | vierundzwanzigstem
+number.25 = fünfundzwanzig | fünfundzwanzigste | fünfundzwanzigsten | fünfundzwanzigstem
+number.26 = sechsundzwanzig | sechsundzwanzigste | sechsundzwanzigsten | sechsundzwanzigstem
+number.27 = siebenundzwanzig | siebenundzwanzigste | siebenundzwanzigsten | siebenundzwanzigstem
+number.28 = achtundzwanzig | achtundzwanzigste | achtundzwanzigsten | achtundzwanzigstem
+number.29 = neunundzwanzig | neunundzwanzigste | neunundzwanzigsten | neunundzwanzigstem
+number.30 = dreißig | dreißigste | dreißigsten | dreißigstem
+number.31 = einunddreißig | einunddreißigste | einunddreißigsten | einunddreißigstem
+
+# LOCALIZATION NOTE (alphabet):
+# list all lower and uppercase letters if your language has an alphabet
+# otherwise leave it empty
+alphabet = abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ