This file is indexed.

/usr/lib/libreoffice/share/extensions/lightproof_en/pythonpath/lightproof_lightproof_en.py is in libreoffice-lightproof-en 0.4.3+1.5+git20140515-2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

1
2
3
# -*- encoding: UTF-8 -*-
from __future__ import unicode_literals
dic = [['(?u)(?<![-\\w\\u2013.,\\u00AD])and and(?![-\\w\\u2013\\u00AD])', 'and', 'Did you mean:', False, 0], ['(?u)(?<![-\\w\\u2013.,\\u00AD])or or(?![-\\w\\u2013\\u00AD])', 'or', 'Did you mean:', False, 0], ['(?u)(?<![-\\w\\u2013.,\\u00AD])for for(?![-\\w\\u2013\\u00AD])', 'for', 'Did you mean:', False, 0], ['(?u)(?<![-\\w\\u2013.,\\u00AD])the the(?![-\\w\\u2013\\u00AD])', 'the', 'Did you mean:', False, 0], ['(?iu)(?<![-\\w\\u2013.,\\u00AD])[Yy][Ii][Nn][Gg] [Aa][Nn][Dd] [Yy][Aa][Nn][Gg](?![-\\w\\u2013\\u00AD])', 'yin and yang', 'Did you mean:', False, 0], ['(?iu)(?<![-\\w\\u2013.,\\u00AD])[Ss][Cc][Oo][Tt] [Ff][Rr][Ee][Ee](?![-\\w\\u2013\\u00AD])', 'scot-free\\nscotfree', 'Did you mean:', False, 0], ["(?iu)(?<![-\\w\\u2013.,\\u00AD])([Yy][Oo][Uu][Rr]|[Hh][Ee][Rr]|[Oo][Uu][Rr]|[Tt][Hh][Ee][Ii][Rr])['’][Ss](?![-\\w\\u2013\\u00AD])", '\\1s', 'Possessive pronoun: \\n http://en.wikipedia.org/wiki/Possessive_pronoun', False, 0], ['(?u)(?<![-\\w\\u2013.,\\u00AD])(?P<a_1>[Aa])n(?P<_>[ ][\'‘"“]?)(?P<vow_1>[aeiouAEIOU]\\w*)(?P<etc_1>[-–\'\\w]*)(?![-\\w\\u2013\\u00AD])', '\\g<a_1>\\g<_>\\g<vow_1>\\g<etc_1>', 'Did you mean: \\n http://en.wikipedia.org/wiki/English_articles#Distinction_between_a_and_an', 'm.group("vow_1") in aA or m.group("vow_1").lower() in aA', 0], ['(?u)(?<![-\\w\\u2013.,\\u00AD])a(?P<_>[ ][\'‘"“]?)(?P<vow_1>[aeiouAEIOU]\\w*)(?P<etc_1>[-–\'\\w]*)(?![-\\w\\u2013\\u00AD])', 'an\\g<_>\\g<vow_1>\\g<etc_1>', 'Bad article? \\n http://en.wikipedia.org/wiki/English_articles#Distinction_between_a_and_an', '(m.group("vow_1") != m.group("vow_1").upper()) and not (m.group("vow_1") in aA or m.group("vow_1").lower() in aA) and spell(LOCALE,m.group("vow_1"))', 0], ['(?u)(?<![-\\w\\u2013.,\\u00AD])a(?P<_>[ ][\'‘"“]?)(?P<con_1>[bcdfghj-np-tv-zBCDFGHJ-NP-TV-Z]\\w*)(?P<etc_1>[-–\'\\w]*)(?![-\\w\\u2013\\u00AD])', 'an\\g<_>\\g<con_1>\\g<etc_1>', 'Did you mean: \\n http://en.wikipedia.org/wiki/English_articles#Distinction_between_a_and_an', 'm.group("con_1") in aAN or m.group("con_1").lower() in aAN', 0], ['(?u)(?<![-\\w\\u2013.,\\u00AD])(?P<a_1>[Aa])n(?P<_>[ ][\'‘"“]?)(?P<con_1>[bcdfghj-np-tv-zBCDFGHJ-NP-TV-Z]\\w*)(?P<etc_1>[-–\'\\w]*)(?![-\\w\\u2013\\u00AD])', '\\g<a_1>\\g<_>\\g<con_1>\\g<etc_1>', 'Bad article? \\n http://en.wikipedia.org/wiki/English_articles#Distinction_between_a_and_an', '(m.group("con_1") != m.group("con_1").upper()) and not (m.group("con_1") in aA or m.group("con_1").lower() in aAN) and not m.group("con_1") in aB and spell(LOCALE,m.group("con_1"))', 0], ['(?u)((?<=[!?.] )|^)A(?P<_>[ ][\'‘"“]?)(?P<vow_1>[aeiouAEIOU]\\w*)(?P<etc_1>[-–\'\\w]*)(?![-\\w\\u2013\\u00AD])', 'An\\g<_>\\g<vow_1>\\g<etc_1>', 'Bad article? \\n http://en.wikipedia.org/wiki/English_articles#Distinction_between_a_and_an', '(m.group("vow_1") != m.group("vow_1").upper()) and not (m.group("vow_1") in aA or m.group("vow_1").lower() in aA) and spell(LOCALE,m.group("vow_1"))', 0], ['(?u)((?<=[!?.] )|^)A(?P<_>[ ][\'‘"“]?)(?P<con_1>[bcdfghj-np-tv-zBCDFGHJ-NP-TV-Z]\\w*)(?P<etc_1>[-–\'\\w]*)(?![-\\w\\u2013\\u00AD])', 'An\\g<_>\\g<con_1>\\g<etc_1>', 'Did you mean: \\n http://en.wikipedia.org/wiki/English_articles#Distinction_between_a_and_an', 'm.group("con_1") in aAN or m.group("con_1").lower() in aAN', 0], ['(?u)(?<![-\\w\\u2013.,\\u00AD])a(?P<_>[ ][\'‘"“]?)(?P<nvow_1>(8[0-9]*|1[18](000)*)(th)?)(?P<etc_1>[-–\'\\w]*)(?![-\\w\\u2013\\u00AD])', 'an\\g<_>\\g<nvow_1>\\g<etc_1>', 'Did you mean: \\n http://en.wikipedia.org/wiki/English_articles#Distinction_between_a_and_an', False, 0], ['(?u)((?<=[!?.] )|^)A(?P<_>[ ][\'‘"“]?)(?P<nvow_1>(8[0-9]*|1[18](000)*)(th)?)(?P<etc_1>[-–\'\\w]*)(?![-\\w\\u2013\\u00AD])', 'An\\g<_>\\g<nvow_1>\\g<etc_1>', 'Did you mean: \\n http://en.wikipedia.org/wiki/English_articles#Distinction_between_a_and_an', False, 0], ['(?u)(?<![-\\w\\u2013.,\\u00AD])(?P<a_1>[Aa])n(?P<_>[ ][\'‘"“]?)(?P<ncon_1>[0-79][0-9]*)(?P<etc_1>[-–\'\\w]*)(?![-\\w\\u2013\\u00AD])', '\\g<a_1>\\g<_>\\g<ncon_1>\\g<etc_1>', 'Did you mean: \\n http://en.wikipedia.org/wiki/English_articles#Distinction_between_a_and_an', 'not m.group("ncon_1")[:2] in ["11", "18"]', 0], ['(?u)(?<![-\\w\\u2013.,\\u00AD])(^)(?P<low_1>[a-z]+)(?![-\\w\\u2013\\u00AD])', '= m.group("low_1").capitalize()', 'Missing capitalization?', 'paralcap.search(TEXT) and not abbrev.search(TEXT)', 0], ['(?u)((?<=[!?.] )|^)(?P<low_1>[a-z]+)(?![-\\w\\u2013\\u00AD])', '= m.group("low_1").capitalize()', 'Missing capitalization?', 'option(LOCALE,"cap") and not abbrev.search(TEXT)', 0], ['(?u) ([.?!,:;)”\\]])\\b', '\\1 ', 'Reversed space and punctuation?', False, 0], ['(?u) +[.]', '.', 'Extra space before the period?', 'LOCALE.Country == "US"', 0], ['(?u) +[.]', '.', 'Extra space before the full stop?', 'LOCALE.Country != "US"', 0], ['(?u) +([?!,:;)”\\]])', '\\1', '= "Extra space before the " + punct[m.group(1)] + "?"', False, 0], ['(?u)([([“]) ', '\\1', '= "Extra space after the " + punct[m.group(1)] + "?"', False, 0], ['(?u)\\b(---?| --? )\\b', ' – \\n—', 'En dash or em dash:', 'not option(LOCALE,"ndash") and not option(LOCALE,"mdash")', 0], ['(?u)\\b(---?| --? |—)\\b', ' – ', 'En dash:', 'option(LOCALE,"ndash") and not option(LOCALE,"mdash")', 0], ['(?u)\\b(---?| --? | – )\\b', '—', 'Em dash:', 'option(LOCALE,"mdash")', 0], ['(?u)(?P<number_1>\\d+([.]\\d+)?)(x| x )(?P<number_2>\\d+([.]\\d+)?)', '\\g<number_1>×\\g<number_2>', 'Multiplication sign. \\n http://en.wikipedia.org/wiki/Multiplication_sign', 'option(LOCALE,"times")', 0], ['(?u)(?P<Abc_1>[a-zA-Z]+)(?P<pun_1>[?!,:;%‰‱˚“”‘])(?P<Abc_2>[a-zA-Z]+)', '\\g<Abc_1>\\g<pun_1> \\g<Abc_2>', 'Missing space?', False, 0], ['(?u)(?P<abc_1>[a-z]+)[.](?P<ABC_1>[A-Z]+)', '\\g<abc_1>. \\g<ABC_1>', 'Missing space?', False, 0], ['(?u)[)]', '', 'Extra closing parenthesis?', 'option(LOCALE,"pair") and not "(" in TEXT', 0], ['(?u)[(]', '', 'Extra opening parenthesis?', 'option(LOCALE,"pair") and TEXT[-1] in u"?!;:”’" and not ")" in TEXT', 0], ['(?u)(?<![0-9])”', '', 'Extra quotation mark?', 'option(LOCALE,"pair") and not u"“" in TEXT', 0], ['(?u)(?<=[0-9])”', '″\\n', 'Bad double prime or extra quotation mark?', 'option(LOCALE,"apostrophe") and not u"“" in TEXT', 0], ['(?u)“', '', 'Extra quotation mark?', 'option(LOCALE,"pair") and TEXT[-1] in u"?!;:”’" and not u"”" in TEXT', 0], ['(?u)[.]{3}', '…', 'Ellipsis.', 'option(LOCALE,"ellipsis")', 0], ['(?u)\\b {2,3}(\\b|$)', '\\1 ', 'Extra space.', 'option(LOCALE,"spaces")', 0], ['(?u)(^|\\b|(?P<pun_1>[?!,:;%‰‱˚“”‘])|[.]) {2,3}(\\b|$)', '\\1 ', 'Extra space.', 'option(LOCALE,"spaces2")', 0], ['(?u)(^|\\b|(?P<pun_1>[?!,:;%‰‱˚“”‘])|[.]) {4,}(\\b|$)', '\\1 \\n\t', 'Change multiple spaces to a single space or a tabulator:', 'option(LOCALE,"spaces3")', 0], ['(?iu)[\\"“”‟„]((?P<abc_1>[a-zA-Z]+)[^\\"“”‟„]*)[\\"“‟]', '“\\1”', 'Quotation marks.', 'option(LOCALE,"quotation")', 0], ['(?iu)[\\"”‟„]((?P<abc_1>[a-zA-Z]+)[^\\"“”‟„]*)[\\"“”‟]', '“\\1”', 'Quotation marks.', 'option(LOCALE,"quotation")', 0], ["(?iu)'(?P<abc_1>[a-zA-Z]+)'", '‘\\g<abc_1>’', 'Quotation marks.', 'option(LOCALE,"apostrophe")', 0], ['(?iu)[\\"”‟„]((?P<abc_1>[a-zA-Z]+)[^\\"“”‟„]*)[\\"“”‟]', '“\\1”', 'Quotation marks.', 'option(LOCALE,"apostrophe")', 0], ["(?iu)(?P<Abc_1>[a-zA-ZA-Z]+)'(?P<w_1>\\w*)", '\\g<Abc_1>’\\g<w_1>', 'Replace typewriter apostrophe or quotation mark:', 'option(LOCALE,"apostrophe")', 0], ["(?u)(?<= )'(?P<Abc_1>[a-zA-Z]+)", '‘\\g<Abc_1>\\n’\\g<Abc_1>', 'Replace typewriter quotation mark or apostrophe:', 'option(LOCALE,"apostrophe")', 0], ["(?u)^'(?P<Abc_1>[a-zA-Z]+)", '‘\\g<Abc_1>\\n’\\g<Abc_1>', 'Replace typewriter quotation mark or apostrophe:', 'option(LOCALE,"apostrophe")', 0], ['(?u)\\b(?P<d2_1>\\d\\d)(?P<d_1>\\d\\d\\d)\\b', '\\g<d2_1>,\\g<d_1>\\n\\g<d2_1>\u202f\\g<d_1>', 'Use thousand separator (common or ISO).', 'option(LOCALE,"numsep")', 0], ['(?u)\\b(?P<D_1>\\d{1,3})(?P<d_1>\\d\\d\\d)(?P<d_2>\\d\\d\\d)\\b', '\\g<D_1>,\\g<d_1>,\\g<d_2>\\n\\g<D_1>\u202f\\g<d_1>\u202f\\g<d_2>', 'Use thousand separators (common or ISO).', 'option(LOCALE,"numsep")', 0], ['(?u)\\b(?P<D_1>\\d{1,3})(?P<d_1>\\d\\d\\d)(?P<d_2>\\d\\d\\d)(?P<d_3>\\d\\d\\d)\\b', '\\g<D_1>,\\g<d_1>,\\g<d_2>,\\g<d_3>\\n\\g<D_1>\u202f\\g<d_1>\u202f\\g<d_2>\u202f\\g<d_3>', 'Use thousand separators (common or ISO).', 'option(LOCALE,"numsep")', 0], ['(?u)(?<![-\\w\\u2013.,\\u00AD])(?P<Abc_1>[a-zA-Z]+) \\1(?![-\\w\\u2013\\u00AD])', '\\g<Abc_1>', 'Word duplication?', 'option(LOCALE,"dup")', 0], ['(?u)(?<![-\\w\\u2013.,\\u00AD])([Tt])his (?P<abc_1>[a-z]+)(?![-\\w\\u2013\\u00AD])', '\\1hese \\g<abc_1>\\n\\1his, \\g<abc_1>', 'Did you mean:', 'option(LOCALE,"grammar") and morph(LOCALE,m.group("abc_1"), "Ns")', 0], ["(?u)(?<![-\\w\\u2013.,\\u00AD])with it['’]s(?![-\\w\\u2013\\u00AD])", 'with its\\nwith, it’s', 'Did you mean:', 'option(LOCALE,"grammar")', 0], ["(?iu)(?<![-\\w\\u2013.,\\u00AD])([Ii][Tt]|[Ss]?[Hh][Ee]) [Dd][Oo][Nn]['’][Tt](?![-\\w\\u2013\\u00AD])", '\\1 doesn’t', 'Did you mean:', 'option(LOCALE,"grammar")', 0], ['(?u)(?<![-\\w\\u2013.,\\u00AD])([-−]?\\d+(?:[,.]\\d+)*) (°F|Fahrenheit)(?![-\\w\\u2013\\u00AD])', '= measurement(m.group(1), "F", "C", u" °C", ".", ",")', 'Convert to Celsius:', 'option(LOCALE,"metric")', 0], ['(?u)(?<![-\\w\\u2013.,\\u00AD])([-−]?\\d+(?:[,.]\\d+)*) (°C|Celsius)(?![-\\w\\u2013\\u00AD])', '= measurement(m.group(1), "C", "F", u" °F", ".", ",")', 'Convert to Fahrenheit:', 'option(LOCALE,"nonmetric")', 0], ['(?u)(?<![-\\w\\u2013.,\\u00AD])([-−]?\\d+(?:[,.]\\d+)*(?: 1/2| ?½)?) (ft|foot|feet)(?! [1-9])(?![-\\w\\u2013\\u00AD])', '= measurement(m.group(1), "ft", "cm", " cm", ".", ",") + "\\n" + measurement(m.group(1), "ft", "m", " m", ".", ",")', 'Convert to metric:', 'option(LOCALE,"metric")', 0], ['(?u)(?<![-\\w\\u2013.,\\u00AD])([-−]?\\d+(?:[,.]\\d+)*(?: 1/2| ?½)?) ft[.]? ([0-9]+(?: 1/2| ?½)?) in(?![-\\w\\u2013\\u00AD])', '= measurement(m.group(1) + "*12+" + m.group(2), "in", "cm", " cm", ".", ",") + "\\n" + measurement(m.group(1) + "*12+" + m.group(2), "in", "m", " m", ".", ",")', 'Convert to metric:', 'option(LOCALE,"metric")', 0], ['(?u)(?<![-\\w\\u2013.,\\u00AD])([-−]?\\d+(?:[,.]\\d+)*(?: 1/2| ?½)?) in(?![-\\w\\u2013\\u00AD])', '= measurement(m.group(1), "in", "mm", " mm", ".", ",") + "\\n" + measurement(m.group(1), "in", "cm", " cm", ".", ",") + "\\n" + measurement(m.group(1), "in", "m", " m", ".", ",")', 'Convert to metric:', 'option(LOCALE,"metric")', 0], ['(?u)(?<![-\\w\\u2013.,\\u00AD])([-−]?\\d+(?:[,.]\\d+)*) mm(?![-\\w\\u2013\\u00AD])', '= measurement(m.group(1), "mm", "in", " in", ".", ",")', 'Convert from metric:', 'option(LOCALE,"nonmetric")', 0], ['(?u)(?<![-\\w\\u2013.,\\u00AD])([-−]?\\d+(?:[,.]\\d+)*) cm(?![-\\w\\u2013\\u00AD])', '= measurement(m.group(1), "cm", "in", " in", ".", ",") + "\\n" + measurement(m.group(1), "cm", "ft", " ft", ".", ",")', 'Convert from metric:', 'option(LOCALE,"nonmetric")', 0], ['(?u)(?<![-\\w\\u2013.,\\u00AD])([-−]?\\d+(?:[,.]\\d+)*) (m|meter|metre)(?![-\\w\\u2013\\u00AD])', '= measurement(m.group(1), "m", "in", " in", ".", ",") + "\\n" + measurement(m.group(1), "m", "ft", " ft", ".", ",") + "\\n" + measurement(m.group(1), "m", "mi", " mi", ".", ",")', 'Convert from metric:', 'option(LOCALE,"nonmetric")', 0], ['(?u)(?<![-\\w\\u2013.,\\u00AD])([-−]?\\d+(?:[,.]\\d+)*(?: 1/2| ?½)?) miles?(?![-\\w\\u2013\\u00AD])', '= measurement(m.group(1), "mi", "m", " m", ".", ",") + "\\n" + measurement(m.group(1), "mi", "km", " km", ".", ",")', 'Convert to metric:', 'option(LOCALE,"metric")', 0], ['(?u)(?<![-\\w\\u2013.,\\u00AD])([-−]?\\d+(?:[,.]\\d+)*) km(?![-\\w\\u2013\\u00AD])', '= measurement(m.group(1), "km", "mi", " mi", ".", ",")', 'Convert to miles:', 'option(LOCALE,"nonmetric")', 0], ['(?u)(?<![-\\w\\u2013.,\\u00AD])([-−]?\\d+(?:,\\d+)?) (yd|yards?)(?![-\\w\\u2013\\u00AD])', '= measurement(m.group(1), "yd", "m", " m", ".", ",")', 'Convert to metric:', 'option(LOCALE,"metric")', 0], ['(?u)(?<![-\\w\\u2013.,\\u00AD])([-−]?\\d+(?:,\\d+)?) (gal(lons?)?)(?![-\\w\\u2013\\u00AD])', '= measurement(m.group(1), "gal", "l", " l", ".", ",") + "\\n" + measurement(m.group(1), "uk_gal", "l", " l (in UK)", ".", ",")', 'Convert to metric:', 'option(LOCALE,"metric")', 0], ['(?u)(?<![-\\w\\u2013.,\\u00AD])([-−]?\\d+(?:,\\d+)?) (pint)(?![-\\w\\u2013\\u00AD])', '= measurement(m.group(1), "pt", "dl", " dl", ".", ",") + "\\n" + measurement(m.group(1), "uk_pt", "dl", " dl (in UK)", ".", ",") + "\\n" + measurement(m.group(1), "pt", "l", " l", ".", ",") + "\\n" + measurement(m.group(1), "uk_pt", "l", " l (in UK)", ".", ",")', 'Convert to metric:', 'option(LOCALE,"metric")', 0], ['(?u)(?<![-\\w\\u2013.,\\u00AD])([-−]?\\d+(?:,\\d+)?) (l|L|litres?|liters?)(?![-\\w\\u2013\\u00AD])', '= measurement(m.group(1), "l", "gal", " gal", ".", ",") + "\\n" + measurement(m.group(1), "l", "gal", " gal (in UK)", ".", ",")', 'Convert to gallons:', 'option(LOCALE,"nonmetric")', 0], ['(?u)(?<![-\\w\\u2013.,\\u00AD])([-−]?\\d+(?:[,.]\\d+)*) lbs?[.]?(?![-\\w\\u2013\\u00AD])', '= measurement(m.group(1), "lbm", "kg", " kg", ".", ",")', 'Convert to metric:', 'option(LOCALE,"metric")', 0], ['(?u)(?<![-\\w\\u2013.,\\u00AD])([-−]?\\d+(?:[,.]\\d+)*) kg[.]?(?![-\\w\\u2013\\u00AD])', '= measurement(m.group(1), "kg", "lbm", " lb", ".", ",")', 'Convert to pounds:', 'option(LOCALE,"nonmetric")', 0], ['(?u)(?<![-\\w\\u2013.,\\u00AD])([-−]?\\d+(?:[,.]\\d+)*) mph(?![-\\w\\u2013\\u00AD])', '= measurement(m.group(1), "mph", "km/h", " km/h", ".", ",")', 'Convert to km/hour:', 'option(LOCALE,"metric")', 0], ['(?u)(?<![-\\w\\u2013.,\\u00AD])([-−]?\\d+(?:[,.]\\d+)*) km/h(?![-\\w\\u2013\\u00AD])', '= measurement(m.group(1), "km/h", "mph", " mph", ".", ",")', 'Convert to miles/hour:', 'option(LOCALE,"nonmetric")', 0]]