• bitcoinBitcoin(BTC)$80,849.000.11%
  • Midas Fasanara Global EuroMidas Fasanara Global Euro(MGLOEURO)$111,813.00-0.36%
  • ethereumEthereum(ETH)$2,344.90-0.19%
  • tetherTether(USDT)$1.000.03%
  • binancecoinBNB(BNB)$754.051.35%
  • rippleXRP(XRP)$1.32-0.99%
  • usd-coinUSDC(USDC)$1.000.01%
  • solanaSolana(SOL)$101.510.17%
  • tronTRON(TRX)$0.329518-0.48%
  • Figure HelocFigure Heloc(FIGR_HELOC)$1.030.03%
  • zcashZcash(ZEC)$1,295.80-0.87%
  • HyperliquidHyperliquid(HYPE)$79.96-2.42%
  • dogecoinDogecoin(DOGE)$0.0793420.36%
  • moneroMonero(XMR)$595.25-0.93%
  • USDSUSDS(USDS)$1.000.02%
  • whitebitWhiteBIT Coin(WBT)$77.610.04%
  • chainlinkChainlink(LINK)$11.720.96%
  • leo-tokenLEO Token(LEO)$9.464.60%
  • cardanoCardano(ADA)$0.204153-1.01%
  • nearNEAR Protocol(NEAR)$4.65-0.36%
  • stellarStellar(XLM)$0.171125-0.05%
  • bitcoin-cashBitcoin Cash(BCH)$286.99-2.64%
  • RainRain(RAIN)$0.006826-4.69%
  • litecoinLitecoin(LTC)$59.303.62%
  • daiDai(DAI)$1.00-0.04%
  • Ethena USDeEthena USDe(USDE)$1.000.02%
  • uniswapUniswap(UNI)$7.211.77%
  • CantonCanton(CC)$0.0995950.23%
  • avalanche-2Avalanche(AVAX)$8.92-0.76%
  • USD1USD1(USD1)$1.000.02%
  • suiSui(SUI)$0.940.32%
  • the-open-networkGram (prev. Toncoin)(GRAM)$1.23-0.17%
  • hedera-hashgraphHedera(HBAR)$0.074800-1.94%
  • tether-goldTether Gold(XAUT)$4,055.590.00%
  • Global DollarGlobal Dollar(USDG)$1.000.01%
  • paypal-usdPayPal USD(PYUSD)$1.000.01%
  • BittensorBittensor(TAO)$255.28-0.51%
  • shiba-inuShiba Inu(SHIB)$0.0000050.54%
  • quant-networkQuant(QNT)$198.14-0.35%
  • EthenaEthena(ENA)$0.206408-1.47%
  • crypto-com-chainCronos(CRO)$0.053274-1.36%
  • Ripple USDRipple USD(RLUSD)$1.000.01%
  • BitwayBitway(BTW)$1.73-0.24%
  • Ondo US Dollar YieldOndo US Dollar Yield(USDY)$1.15-0.01%
  • Circle USYCCircle USYC(USYC)$1.140.01%
  • MemeCoreMemeCore(M)$1.03-3.89%
  • okbOKB(OKB)$111.321.45%
  • BlackRock USD Institutional Digital Liquidity FundBlackRock USD Institutional Digital Liquidity Fund(BUIDL)$1.000.00%
  • pepePepe(PEPE)$0.0000058.32%
  • aaveAave(AAVE)$133.37-0.75%
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

FCC Chair Wants To Let Prisons Jam Illegal Cellphones

Microsoft Posts 19% Revenue Growth as Azure Revenue Jumps 48% – Unite.AI

ShareTweetSendSharePin

Related Posts

FCC Chair Wants To Let Prisons Jam Illegal Cellphones
AI & Technology

FCC Chair Wants To Let Prisons Jam Illegal Cellphones

October 28, 2026
Microsoft Posts 19% Revenue Growth as Azure Revenue Jumps 48% – Unite.AI
AI & Technology

Microsoft Posts 19% Revenue Growth as Azure Revenue Jumps 48% – Unite.AI

October 28, 2026
Google Rolls Out AI Mode Ads in 10 Countries, Multiturn Ads in U.S. – Unite.AI
AI & Technology

Google Rolls Out AI Mode Ads in 10 Countries, Multiturn Ads in U.S. – Unite.AI

October 28, 2026
Apple’s PROLED XDR Display Has A Cringy Name But Incredible Specs
AI & Technology

Apple’s PROLED XDR Display Has A Cringy Name But Incredible Specs

October 28, 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
New gene therapy gives some kids born deaf the ability to hear

New gene therapy gives some kids born deaf the ability to hear

October 22, 2026
Ramelius Resources Limited (RMLRF) Q1 2027 Earnings Call Transcript

Ramelius Resources Limited (RMLRF) Q1 2027 Earnings Call Transcript

October 26, 2026
Rapid-fire questions with Becky G

Rapid-fire questions with Becky G

October 25, 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!