• bitcoinBitcoin(BTC)$60,821.001.00%
  • ethereumEthereum(ETH)$1,706.151.17%
  • tetherTether(USDT)$1.00-0.01%
  • binancecoinBNB(BNB)$556.500.57%
  • usd-coinUSDC(USDC)$1.000.00%
  • rippleXRP(XRP)$0.951.27%
  • solanaSolana(SOL)$71.651.33%
  • Figure HelocFigure Heloc(FIGR_HELOC)$1.062.19%
  • tronTRON(TRX)$0.3045960.46%
  • HyperliquidHyperliquid(HYPE)$63.232.37%
  • zcashZcash(ZEC)$719.84-5.64%
  • dogecoinDogecoin(DOGE)$0.0569601.82%
  • moneroMonero(XMR)$449.48-14.18%
  • leo-tokenLEO Token(LEO)$9.060.62%
  • whitebitWhiteBIT Coin(WBT)$61.405.08%
  • chainlinkChainlink(LINK)$9.393.61%
  • USDSUSDS(USDS)$1.000.01%
  • cardanoCardano(ADA)$0.1504752.60%
  • Ethena USDeEthena USDe(USDE)$1.00-0.05%
  • stellarStellar(XLM)$0.127950-0.10%
  • daiDai(DAI)$1.00-0.01%
  • bitcoin-cashBitcoin Cash(BCH)$211.143.59%
  • nearNEAR Protocol(NEAR)$3.102.14%
  • litecoinLitecoin(LTC)$44.123.68%
  • CantonCanton(CC)$0.076144-1.51%
  • avalanche-2Avalanche(AVAX)$6.660.70%
  • tether-goldTether Gold(XAUT)$3,567.01-0.17%
  • uniswapUniswap(UNI)$4.72-0.53%
  • USD1USD1(USD1)$1.00-0.04%
  • the-open-networkGram (prev. Toncoin)(GRAM)$0.972.21%
  • Ripple USDRipple USD(RLUSD)$1.000.01%
  • suiSui(SUI)$0.671.71%
  • Global DollarGlobal Dollar(USDG)$1.000.01%
  • hedera-hashgraphHedera(HBAR)$0.0548915.37%
  • Ondo US Dollar YieldOndo US Dollar Yield(USDY)$1.150.00%
  • paypal-usdPayPal USD(PYUSD)$1.000.00%
  • quant-networkQuant(QNT)$149.753.53%
  • BittensorBittensor(TAO)$185.611.73%
  • shiba-inuShiba Inu(SHIB)$0.0000041.74%
  • Spiko Amundi Overnight Swap Fund (EUR)Spiko Amundi Overnight Swap Fund (EUR)(EURSAFO)$1.12-0.05%
  • Circle USYCCircle USYC(USYC)$1.150.00%
  • crypto-com-chainCronos(CRO)$0.039811-0.57%
  • MemeCoreMemeCore(M)$0.833.76%
  • RainRain(RAIN)$0.002540-7.36%
  • okbOKB(OKB)$83.081.23%
  • Falcon USDFalcon USD(USDF)$1.000.17%
  • United StablesUnited Stables(U)$1.000.03%
  • pax-goldPAX Gold(PAXG)$3,565.20-0.24%
  • BlackRock USD Institutional Digital Liquidity FundBlackRock USD Institutional Digital Liquidity Fund(BUIDL)$1.000.00%
  • BitwayBitway(BTW)$0.9910.44%
TradePoint.io
  • Main
  • AI & Technology
  • Stock Charts
  • Market & News
  • Business
  • Finance Tips
  • Trade Tube
  • Blog
  • Shop
No Result
View All Result
TradePoint.io
No Result
View All Result

How to Build a Document Intelligence Backend with iii Using Workers, Functions, and Cron Triggers

June 3, 2026
in AI & Technology
Reading Time: 2 mins read
A A
How to Build a Document Intelligence Backend with iii Using Workers, Functions, and Cron Triggers
ShareShareShareShareShare
def normalize(data):
   return {"text": (data.get("text") or "").strip().lower()}
def tokenize(data):
   text   = data.get("text", "")
   cleaned = "".join(c if (c.isalnum() or c.isspace()) else " " for c in text)
   tokens = [t for t in cleaned.split() if t]
   return {"tokens": tokens, "count": len(tokens)}
def sentiment(data):
   toks  = data.get("tokens", [])
   pos   = sum(t in POSITIVE for t in toks)
   neg   = sum(t in NEGATIVE for t in toks)
   score = pos - neg
   label = "positive" if score > 0 else "negative" if score < 0 else "neutral"
   return {"label": label, "score": score, "pos": pos, "neg": neg}
def keywords(data):
   toks = data.get("tokens", [])
   stop = {"the","a","an","is","it","to","of","and","in","for","on","how"}
   freq = Counter(t for t in toks if t not in stop and len(t) > 2)
   return {"keywords": freq.most_common(data.get("top_n", 5))}
def analyze(data):
   norm = worker.trigger({"function_id": "text::normalize", "payload": {"text": data.get("text","")}})
   toks = worker.trigger({"function_id": "text::tokenize",  "payload": norm})
   sent = worker.trigger({"function_id": "text::sentiment", "payload": toks})
   keys = worker.trigger({"function_id": "text::keywords",  "payload": {**toks, "top_n": data.get("top_n", 5)}})
   with _LOCK:
       _STATE["docs_analyzed"] += 1
       for k, c in keys["keywords"]:
           _STATE["keyword_totals"][k] += c
       n = _STATE["docs_analyzed"]
   return {"tokens": toks["count"], "sentiment": sent, "keywords": keys["keywords"], "docs_analyzed": n}
def report(data):
   with _LOCK:
       return {"docs_analyzed": _STATE["docs_analyzed"],
               "heartbeats":    _STATE["heartbeats"],
               "top_keywords_all_docs": _STATE["keyword_totals"].most_common(5)}
def http_analyze(data):
   body   = data.get("body") or {}
   result = worker.trigger({"function_id": "pipeline::analyze", "payload": body})
   return {"status_code": 200, "body": result, "headers": {"Content-Type": "application/json"}}
def heartbeat(data):
   with _LOCK:
       _STATE["heartbeats"] += 1
   return {"ok": True}
for fid, fn in [
   ("text::normalize", normalize), ("text::tokenize", tokenize),
   ("text::sentiment", sentiment), ("text::keywords", keywords),
   ("pipeline::analyze", analyze), ("stats::report", report),
   ("http::analyze", http_analyze), ("cron::heartbeat", heartbeat),
]:
   worker.register_function(fid, fn)

Credit: Source link

YOU MAY ALSO LIKE

1Password Says It Was Hacked But Users’ Vaults Are Safe

Canada Invests $700 Million More to Expand AI Compute Access Fund – Unite.AI

ShareTweetSendSharePin

Related Posts

1Password Says It Was Hacked But Users’ Vaults Are Safe
AI & Technology

1Password Says It Was Hacked But Users’ Vaults Are Safe

November 26, 2026
Canada Invests 0 Million More to Expand AI Compute Access Fund – Unite.AI
AI & Technology

Canada Invests $700 Million More to Expand AI Compute Access Fund – Unite.AI

November 26, 2026
Workers At GTA 6 Studio Rockstar Games Vote Overwhelmingly Against Union Recognition
AI & Technology

Workers At GTA 6 Studio Rockstar Games Vote Overwhelmingly Against Union Recognition

November 26, 2026
AI Could Soon Edit Live Videos in Real Time – Unite.AI
AI & Technology

AI Could Soon Edit Live Videos in Real Time – Unite.AI

November 26, 2026
Next Post
British lawmaker Jess Asato sues Elon Musk’s xAI after Grok users made fake sexualized images of her in a bikini

British lawmaker Jess Asato sues Elon Musk's xAI after Grok users made fake sexualized images of her in a bikini

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Search

No Result
View All Result
Will More Money Change You? Automate Giving and Keep Your Old Friends

Will More Money Change You? Automate Giving and Keep Your Old Friends

November 23, 2026
Federal Home Energy Tax Credits Ended – Check State & Utility Rebates Before You Sign

Federal Home Energy Tax Credits Ended – Check State & Utility Rebates Before You Sign

November 20, 2026
John Deere Buys Orchard AI to Pair Crop Scans with Farm Equipment – Unite.AI

John Deere Buys Orchard AI to Pair Crop Scans with Farm Equipment – Unite.AI

November 20, 2026

About

Learn more

Our Services

Legal

Privacy Policy

Terms of Use

Bloggers

Learn more

Article Links

Contact

Advertise

Ask us anything

©2020- TradePoint.io - All rights reserved!

Tradepoint.io, being just a publishing and technology platform, is not a registered broker-dealer or investment adviser. So we do not provide investment advice. Rather, brokerage services are provided to clients of Tradepoint.io by independent SEC-registered broker-dealers and members of FINRA/SIPC. Every form of investing carries some risk and past performance is not a guarantee of future results. “Tradepoint.io“, “Instant Investing” and “My Trading Tools” are registered trademarks of Apperbuild, LLC.

This website is operated by Apperbuild, LLC. We have no link to any brokerage firm and we do not provide investment advice. Every information and resource we provide is solely for the education of our readers. © 2020 Apperbuild, LLC. All rights reserved.

No Result
View All Result
  • Main
  • AI & Technology
  • Stock Charts
  • Market & News
  • Business
  • Finance Tips
  • Trade Tube
  • Blog
  • Shop

© 2023 - TradePoint.io - All Rights Reserved!