mirror of
https://github.com/facebook/duckling.git
synced 2024-12-11 06:46:26 +03:00
74936df848
Summary: This change refactors the Engine to use a different code path for when we're calling `lookupItem` to find a first token `Node` matching the rule and a different one for subsequent ones. This division lets us get better invariants and more importantly do full text regexp matches only when necessary. This should be particularly useful for longer texts. Reviewed By: patapizza Differential Revision: D4953918 fbshipit-source-id: e3a69ad
15 lines
415 B
Haskell
15 lines
415 B
Haskell
-- Copyright (c) 2016-present, Facebook, Inc.
|
|
-- All rights reserved.
|
|
--
|
|
-- This source code is licensed under the BSD-style license found in the
|
|
-- LICENSE file in the root directory of this source tree. An additional grant
|
|
-- of patent rights can be found in the PATENTS file in the same directory.
|
|
|
|
|
|
module Duckling.Engine.Regex
|
|
( matchAll
|
|
, matchOnce
|
|
) where
|
|
|
|
import Text.Regex.Base (matchAll, matchOnce)
|