Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jKI6g-0006d8-TE for pgsql-bugs@arkaria.postgresql.org; Fri, 03 Apr 2020 08:55:18 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jKI6f-0003r6-P1 for pgsql-bugs@arkaria.postgresql.org; Fri, 03 Apr 2020 08:55:17 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jKI6f-0003qg-FC for pgsql-bugs@lists.postgresql.org; Fri, 03 Apr 2020 08:55:17 +0000 Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jKI6c-0000xX-Tq for pgsql-bugs@lists.postgresql.org; Fri, 03 Apr 2020 08:55:16 +0000 Received: by mail-wm1-x341.google.com with SMTP id d202so6830102wmd.1 for ; Fri, 03 Apr 2020 01:55:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=km6nM97nEGG6PI/qTf9toH+PZ6L8qdf48AJ5/QCTtzc=; b=oIBkxVgqhixsFc2kbxKWNrxZLtAVOa9zBHGch5HerBJhglcLIAzDExIX2yXc5P1lwt WmXKNwxiS5NJSRujMfUWVbKLdkKD4m7M6OenZRP2Ad6io7yqECeDmNhH2Csifxf3NcZx 4O9Gl0F7CtqvGwmiHZiZ3FkXg/aJGUdLkqoK4Fk6BuLwSOp8Qz7LtxZqEJ3k8zpv0gXN SHMZMogiGzis+GVo5wz8mgWnYqx5ZqPi8ZLJmIHAv6q+iAW5zKxnUjgu2chTKc1MWP3+ XBDg08MReDpPlkUCCFkKKf2xUTPP/J0UjFvnbrqqfqZ1h6rkQVJ0MP//EnTcAScDcBto tuQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=km6nM97nEGG6PI/qTf9toH+PZ6L8qdf48AJ5/QCTtzc=; b=elj+bhNGFktHwyaSdJ4WLybuICJKiY5GRDAmxLJRCab+jMbu3ZeHX7el0AgLilqVuX xRww4UY7YFtxdwpn/7sg0eGjYo/ucx+r6f3jqL18fdldvMZZtTaU9RnRx+O90ovV5lfN bY9OMk9z8RBkvqw1a5skTnYetn6UXlc3vtLv0QsCdrLaXBgRI4mTUGhUy1UHmfykpk6v eCSXAO/uKb2zW4Yv1zHumSPaGrKx3SJEvnlhJ67mU76kElU6KIbOPpBDeV3ehpHzns7i QfjJ8VaNxhK+/gR94kpd9RwZbjZRKXUsVCSlHT9ItSmUR6bmOjjMOqBCBEXiUQL2GIIh Ce6w== X-Gm-Message-State: AGi0PubA2i5u7DQekEi57UqoTnoHs1yUdqDRi8/0WmKgV3R5uJ8gzl/U YrIz8XxLJL8FhAvm7NOlB0IjIgCsOjU= X-Google-Smtp-Source: APiQypKd705xqJo3RplZWNuUDz7YFJppLt4ylANLxBYMQuKsXRENO4RhotbRVU0O8hOpSw7oVxz8sQ== X-Received: by 2002:a1c:a7c4:: with SMTP id q187mr7526586wme.88.1585904113554; Fri, 03 Apr 2020 01:55:13 -0700 (PDT) Received: from localhost (ip-86-49-253-141.net.upcbroadband.cz. [86.49.253.141]) by smtp.gmail.com with ESMTPSA id k3sm10380117wmf.16.2020.04.03.01.55.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Apr 2020 01:55:12 -0700 (PDT) Date: Fri, 3 Apr 2020 10:55:09 +0200 From: Tomas Vondra To: Artur Zakirov Cc: matti.linnanvuori@portalify.com, pgsql-bugs@lists.postgresql.org, PG Bug reporting form Subject: Re: BUG #16337: Finnish Ispell dictionary cannot be created Message-ID: <20200403085509.bwrvm7hfh6h4vgrl@development> References: <16337-0a68a7a1726ffbc6@postgresql.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Fri, Apr 03, 2020 at 12:33:00PM +0900, Artur Zakirov wrote: >Hello, > >On 4/2/2020 7:11 PM, PG Bug reporting form wrote: >>postgres=# CREATE TEXT SEARCH DICTIONARY finnish_ispell ( TEMPLATE = ispell, >>DictFile = fi_fi, AffFile = fi_fi, Stopwords = finnish); >>ERROR: syntax error >>CONTEXT: line 83 of configuration file >>"/usr/pgsql-12/share/tsearch_data/fi_fi.affix": " I > >>ALI\- >>" > >Thank you for the email. > >It seems that here the backslash is used to escape the following >character according to the comment for the following flag: > >>flag *E: >> . > YLI # ylijohtaja >> I > YLI\- # yli-inhimillinen > >Escaping character is valid for ispell format (see >https://manpages.debian.org/testing/ispell/ispell.5.en.html): > >>Any character with special meaning to the parser can be changed to an uninterpreted token by backslashing it > >I've looked also for Hunspell finnish dictionary. But I didn't find >any I found only some postgres extension: >https://github.com/Houston-Inc/dict_voikko > > >I think it is possible to fix the postgres parser. But I'm not sure >should we do that. > I'm not sure if it's a valid ispell format (it might be, but I'm not very good in reading the ispell manpage). But if it is, we should fix the code to be able to read it. >At first sight it is necessary to fix parse_affentry(). > Right, that seems like the place to fix. It seems we don't expect '-' (escaped) when in PAE_INREPL state. I wonder if there are other things we fail to support ... regards -- Tomas Vondra http://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services