mirror of
https://github.com/github/semantic.git
synced 2025-01-09 00:56:32 +03:00
Stub out rws function
This commit is contained in:
parent
752d494795
commit
2e3b28ec78
11
src/RWS.hs
11
src/RWS.hs
@ -30,6 +30,13 @@ data UnmappedTerm f fields = UnmappedTerm {
|
||||
-- | Either a `term`, an index of a matched term, or nil.
|
||||
data TermOrIndexOrNone term = Term term | Index Int | None
|
||||
|
||||
rws = do
|
||||
ses <- ses' as bs
|
||||
(featureAs, featureBs, mappedDiffs, allDiffs) <- genFeaturizedTermsAndDiffs ses
|
||||
nearestNeighbours <- findNearestNeighoursToDiff allDiffs (minimumTermIndex featureAs, toMap featureAs, toMap featureBs)
|
||||
remaining <- deleteRemaining nearestNeighbours mappedDiffs
|
||||
insertMapped remaining
|
||||
|
||||
|
||||
data RWS f (fields :: [*]) result where
|
||||
-- RWS :: RWS a b (EditScript a b)
|
||||
@ -79,10 +86,6 @@ eraseFeatureVector term = let record :< functor = runCofree term in
|
||||
setFeatureVector :: HasField fields (Maybe FeatureVector) => Record fields -> Maybe FeatureVector -> Record fields
|
||||
setFeatureVector = setField
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
data EditGraph a b = EditGraph { as :: !(Array Int a), bs :: !(Array Int b) }
|
||||
deriving (Eq, Show)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user