dcolley / integromat-facebook-support

0 stars 0 forks source link

So I have a few scenarios but I haven't worked a lot with arrays, the itera... #155

Open dcolley opened 2 years ago

dcolley commented 2 years ago

Source: copied from https://www.facebook.com/groups/integromat/permalink/3968965529880717/

So I have a few scenarios but I haven't worked a lot with arrays, the iterators and repeaters. Mostly I just haven't needed to.

So I want to learn a bit more, so I created a scenario for myself. Using Azure Spell Check, I have have a sentence I am spell checking.

So using this input/output, I want to rebuild the original sentence, replacing the two incorrect words.

Logically I want to cycle through for every "flagged token" then get the offset, the token - then use the replace text parser and rinse and repeat for every flagged token.

I can see that there must be times where it gives more than one suggestion? Which I might work on after that (even sorting by probability?)

So I have my bing module, what is the next module here?

dcolley commented 2 years ago

Comment ID: 3969537969823473 I'd cycle through the flagged tokens, for each one I'd:

  1. Check the score is above a threshold I determine is enough.
  2. Use offset and token length to know what part of the string to replace.
  3. Replace that part with the suggestion.

One thing to remember - do this from the last token to first, so the next token offset won't move as you replace a token. Easiest is to use reverse() for that.

dcolley commented 2 years ago

Comment ID: 3970346016409335 David Treves ooohhh that last tip is huge.

I guess my question though is that my next module is an iterator, right?

dcolley commented 2 years ago

Comment ID: 3970681553042448 Scott Deewizz yes correct 🙂