<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by pan on Medium]]></title>
        <description><![CDATA[Stories by pan on Medium]]></description>
        <link>https://medium.com/@panyo973000?source=rss-9e7d44e21f55------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*c1ED-DAmims9zlEZY0gmFQ@2x.jpeg</url>
            <title>Stories by pan on Medium</title>
            <link>https://medium.com/@panyo973000?source=rss-9e7d44e21f55------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 04:03:22 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@panyo973000/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[The Hidden Cost Problem That’s Quietly Killing Enterprise AI Projects]]></title>
            <link>https://panyo973000.medium.com/the-hidden-cost-problem-thats-quietly-killing-enterprise-ai-projects-c97991e2392a?source=rss-9e7d44e21f55------2</link>
            <guid isPermaLink="false">https://medium.com/p/c97991e2392a</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[digital-transformation]]></category>
            <category><![CDATA[llm]]></category>
            <dc:creator><![CDATA[pan]]></dc:creator>
            <pubDate>Wed, 10 Jun 2026 07:06:34 GMT</pubDate>
            <atom:updated>2026-06-10T07:06:34.083Z</atom:updated>
            <content:encoded><![CDATA[<p>Why choosing the most powerful model is often the wrong decision and what to do instead.</p><p>Here’s a pattern I’ve seen play out more times than I’d like to admit.</p><p>An AI project gets greenlit. The team builds a proof of concept using one of the top-tier models. The demo goes well. Leadership is impressed. The project moves forward.</p><p>Then, about three months after production launch, someone finally runs the numbers on API costs. The total is significantly higher than anyone had planned for. Suddenly, the project that looked like a clear win is being asked to justify its ROI, and the team is scrambling to figure out how to cut costs without breaking everything.</p><p>The model they chose worked fine. The problem was that nobody designed a cost architecture around it.</p><p>I was reminded of this when a business unit manager asked me, mid-project: “Our team processes hundreds of cases a day manually. If every single one gets sent to the most expensive model, what does that actually cost us?” I realized we hadn’t seriously run that calculation at the start of the project.</p><p>That question sounds like a finance question. But the real issue underneath it is a structural one: most teams enter AI projects without a clear mental model of how AI costs work.</p><h3><strong>Why AI Costs Are Structurally Different</strong></h3><p>In traditional software development, costs are relatively predictable. You pay for development time, infrastructure, and licensing. Once a system is live and stable, costs don’t scale with usage, the same logic runs whether you process ten records or ten thousand.</p><p>AI breaks this model in three ways.</p><p><strong>Token consumption scales linearly with usage.</strong> Every API call costs money, and that cost grows directly with volume. If you’re running 50,000 inferences a month at launch and 500,000 a year later, your bill grows tenfold, before you’ve changed a single line of code.</p><p><strong>The gap between model tiers is enormous.</strong> The per-token cost difference between a lightweight model and a frontier model can be 30x or more. That’s not a marginal difference. It’s the difference between a system that’s economically sustainable at scale and one that quietly becomes unaffordable.</p><p><strong>Maintenance is an ongoing cost, not a one-time event.</strong> AI systems don’t stay calibrated on their own. Data distributions shift. Business rules change. New edge cases appear. Keeping a production AI system performing well requires continuous data annotation, model validation, and periodic recalibration, recurring operational costs that don’t appear on any initial budget.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ccf6SrtQE7kg9S5heHtg4g.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@moneyphotos?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">rc.xyz NFT gallery</a> on <a href="https://unsplash.com/photos/a-pile-of-money-sitting-on-top-of-a-wooden-floor-K_3UV1ZFcJ0?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><h3><strong>Cost and Value Have to Be Thought About Together</strong></h3><p>Before diving into cost management strategies, one framing principle matters: the goal isn’t to minimize cost. It’s to ensure that what you spend on each use case is justified by the value it generates.</p><p>The value side of AI typically runs across three dimensions:</p><ul><li>decision accuracy (does the AI judgment actually replace or augment human judgment effectively?)</li><li>labor reduction (how much does it actually decrease manual review?)</li><li>compliance transparency (does the system produce the audit trail that regulators require?).</li></ul><p>The cost side runs across three dimensions too:</p><ul><li>token spend (scales with volume and task complexity)</li><li>inference latency (higher-tier models take longer, which matters in real-time systems)</li><li>maintenance overhead (ongoing annotation, fine-tuning, and evaluation cycles).</li></ul><p>Cost management, properly understood, is about optimizing the ratio between these two sides — not about squeezing every dollar out of the cost column.</p><h3><strong>Three Strategies That Actually Work in Production</strong></h3><p>Here are three approaches I’ve used in production AI systems in financial services. They’re not mutually exclusive, the most effective architectures typically combine all three.</p><h4><strong>Strategy 1: Tiered Model Architecture</strong></h4><p>The core logic is simple: not every task requires your most capable model. A lightweight model might cost 1/30th of a frontier model per token. If a large portion of your inputs are straightforward, clear structure, unambiguous classification, routing them all through the most expensive model is pure waste.</p><p><strong>How to design it:</strong> Route all inputs through the lightweight model first, but require it to return a confidence score alongside every answer (via logprobs, or a probability field in structured output). When the confidence score falls below a defined threshold, automatically escalate that input to the higher-tier model for re-evaluation. There’s no universal threshold, you need to calibrate it against your Golden Dataset by measuring each model’s accuracy distribution across different input types, then find the cutoff that balances cost savings with acceptable accuracy.</p><p><strong>Validate the underlying assumption first:</strong> This strategy only delivers meaningful cost savings if a substantial portion of your inputs are genuinely simple enough for the lightweight model to handle confidently. Before committing to this architecture, run an experiment: use your Golden Dataset to map the confidence score distribution for the lightweight model. If 70–80% of cases score above 0.85, the tiered architecture will deliver significant savings. If most cases cluster in the 0.5–0.7 range, the task’s semantic complexity likely exceeds the lightweight model’s capabilities, and you need to rethink the design.</p><p><strong>The anti-pattern to avoid:</strong> Some teams set the escalation threshold so high (e.g., only let the small model handle cases with confidence &gt; 0.95) that almost everything gets escalated anyway, and costs barely change. A tiered architecture requires accepting some uncertainty at the lower tier. If you don’t trust the lightweight model at all, you haven’t actually built a tiered system, you’ve just added a pass-through layer.</p><h4><strong>Strategy 2: Rule-Based Pre-filtering + LLM Semantic Judgment</strong></h4><p>A different angle: instead of making the model cheaper, make it so that a portion of inputs never need to touch the model at all.</p><p>In most financial services use cases, some fraction of inputs are fully deterministic, a specific set of terms maps to a specific classification with no semantic ambiguity. These cases can be handled by exact string matching with 100% accuracy and near-zero cost. Filtering them out before they reach the LLM simultaneously reduces token spend and improves overall accuracy, since deterministic matching is more consistent than model inference on structured data.</p><p><strong>Who builds the rule layer and why it matters:</strong> The keyword mapping table for the rule layer needs to be built by domain experts, not the engineering team. Engineers don’t have the business knowledge to know which phrases mean the same thing in a specific context. This work is, at its core, the structured digitization of business judgment, it requires people who have actually processed the relevant cases. Starting from high-frequency historical inputs, a domain expert can typically build an initial table covering 100–200 terms per category. Once that baseline exists, the rule layer usually achieves a 50–70% hit rate, meaning more than half of all inputs are resolved without any model inference at all.</p><p><strong>Make the rule layer self-reinforcing over time:</strong> The rule layer shouldn’t be a static artifact. Every case that goes through LLM inference and then gets verified by a human reviewer is an opportunity to ask: “Should this pattern be added to the rule layer?” The simplest implementation is a checkbox in the human review interface, “add to rule library.” Over time, the proportion of inputs requiring model inference steadily decreases, and the cost structure continuously improves.</p><p><strong>The organizational obstacle:</strong> Getting domain experts to build the keyword table often meets resistance. The common pushback is: “isn’t that a technical task?” This framing needs to be corrected early. The rule layer is a codification of business logic, it can’t be built without domain knowledge, and attempting to have engineers infer the rules produces a weaker, less accurate result. Reframing it as what it actually is a structured capture of the team’s own expertise, tends to get better buy-in than framing it as a technical deliverable.</p><h4><strong>Strategy 3: Prompt Engineering for Cost Efficiency</strong></h4><p>The first two strategies reduce how often you call the model. This one reduces how much each call costs.</p><p>Most people think of prompt engineering as a way to improve accuracy. It’s also cost engineering. A poorly designed prompt can include redundant context, repeated formatting instructions, and ambiguous output requirements that collectively inflate token consumption without meaningfully improving response quality. Every unnecessary line of text in your prompt is budget spent on nothing.</p><p><strong>Output tokens cost more than input tokens, often 2–4x more.</strong> This asymmetry matters more than most teams realize. If your prompt doesn’t constrain output format, the model will generate explanatory prose which is expensive and hard to parse downstream. For classification or structured extraction tasks, requiring JSON output with fixed fields (classification result, confidence score, brief rationale if needed) is both cheaper and more reliable than free-form natural language responses.</p><p><strong>System prompt caching is an underused lever.</strong> In batch processing or multi-turn scenarios, your system prompt is re-billed on every call. If your system prompt contains substantial static content, role definition, business background, output format specification, consider using a model that supports prompt caching (both OpenAI and Anthropic offer this). The mechanics: place all static content at the beginning of the system prompt, followed by the dynamic per-call input. The static prefix is only billed fully on the first call; subsequent calls pay a fraction of that cost. For high-volume systems with long system prompts, this can meaningfully reduce per-call cost.</p><p><strong>Few-shot examples: add with intention, not as insurance.</strong> Adding example cases to a prompt can improve accuracy but each example consumes tokens on every call. The right approach is to start with zero-shot, evaluate accuracy against your Golden Dataset, and only add examples if accuracy falls short. When you do add examples, prioritize the most representative edge cases in each category, not a broad sampling. The marginal accuracy gain from few-shot examples typically plateaus after three to four examples, adding more beyond that increases cost without meaningfully improving results.</p><h3><strong>Cost Management Is an Ongoing Process, Not a Setup Step</strong></h3><p>These three strategies aren’t something you configure once and forget. As volume grows, models get updated, and business requirements change, your cost structure shifts and needs to be periodically re-evaluated.</p><p>A practical approach: after launch, build a cost visibility dashboard that tracks per-call costs by task type, rule layer hit rate, and confidence score distribution. These metrics tell you where the current architecture has room to improve, and let you project how costs will scale as volume increases.</p><p>If you’re waiting for the monthly invoice to discover cost problems, the architecture usually needs significant rework by that point. Making costs continuously visible is one of the most overlooked and most important operational practices in production AI systems.</p><p><em>Cost awareness isn’t something you apply after AI is deployed. It should be part of every design decision from the first requirements conversation.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c97991e2392a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Can Agentic AI Actually Work in Financial Services?]]></title>
            <link>https://panyo973000.medium.com/can-agentic-ai-actually-work-in-financial-services-4af619d449b6?source=rss-9e7d44e21f55------2</link>
            <guid isPermaLink="false">https://medium.com/p/4af619d449b6</guid>
            <category><![CDATA[financial-services]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[finance]]></category>
            <category><![CDATA[ai-transformation]]></category>
            <dc:creator><![CDATA[pan]]></dc:creator>
            <pubDate>Tue, 05 May 2026 01:50:58 GMT</pubDate>
            <atom:updated>2026-05-05T01:50:58.779Z</atom:updated>
            <content:encoded><![CDATA[<p>The gap between what people imagine and what actually happens on the ground.</p><p>Agentic AI is everywhere right now. Autonomous orchestration, multi-agent collaboration, AI that works like an employee, the marketing pitch is compelling, and it’s landed. I’ve had executives walk into meetings asking when we can have AI agents “just handle things” on behalf of the team.</p><p>I’m not here to dismiss Agentic AI. The technology is genuinely capable, and there are scenarios where it creates real value. But after working through actual deployments in financial services, I’ve found that the gap between the promise and the reality is wide, and it’s not where most people expect it to be.</p><p>The obstacles aren’t primarily about model quality. They’re about infrastructure, compliance, and operational culture. And if you’re planning to deploy Agentic AI in a regulated financial environment, understanding those obstacles before you start will save you a lot of pain.</p><p>Let me walk through three phases, before, during, and after deployment, and name what actually gets in the way.</p><h3><strong>Before You Build: The Infrastructure Reality Check</strong></h3><p>One of the most compelling parts of the Agentic AI narrative is that an agent can “operate like a human” , accessing systems, processing data, taking actions. That framing makes it sound like deployment is mostly a product decision. In financial services, it’s not. It’s an infrastructure and compliance problem first.</p><p><strong>Data access creates an immediate tension.</strong> For an agent to make useful decisions, it needs data. In financial services, that data is customer account information, policy records, credit histories , all of it subject to regulatory constraints on how it can be processed, transmitted, and stored. Before you can let an agent touch any of it, you need answers to questions most teams haven’t asked yet: Can this data be sent to a cloud-based model? What anonymization or masking is required? Does doing so comply with financial regulatory guidelines in your jurisdiction?</p><p>These aren’t edge cases. They’re prerequisites. And they often require months of legal, compliance, and IT review before a single line of agent code can be written.</p><p><strong>RPA integration is harder than it looks.</strong> A common vision for Agentic AI in financial services is that it will layer on top of existing automation, letting agents invoke RPA workflows as tools, creating smarter, more flexible automation pipelines. The problem is that most RPA in financial institutions runs on local machines or internal networks, not as cloud-accessible services. There’s no API for the agent to call. Getting there requires migrating RPA infrastructure toward cloud-compatible architectures, which touches IT architecture, security reviews, and compliance approvals. That’s not a sprint, that’s a multi-quarter initiative.</p><p>None of this means you shouldn’t pursue Agentic AI. It means that the first step isn’t writing agent code. <strong>It’s mapping your data flows, auditing your existing automation infrastructure, and identifying where the regulatory and technical constraints actually sit.</strong> Do that work upfront, and you’ll have a realistic picture of what’s actually buildable in your environment and what timeline makes sense.</p><h3><strong>During Deployment: When Agent Autonomy Meets Compliance Requirements</strong></h3><p>Here’s the fundamental tension that makes Agentic AI hard in financial services: its most valuable capability, autonomous orchestration, is exactly what compliance frameworks are designed to constrain.</p><p><strong>Financial services requires audit trails.</strong> Every significant business decision needs to be traceable: why was this claim approved? Why was this account flagged? Why did this policy get routed through a particular review path? These aren’t bureaucratic requirements, they’re what regulators look for during examinations, and what legal teams need when decisions get challenged.</p><p>An agent that autonomously selects its own path to complete a goal creates an audit ability problem. If the agent decides to take a shortcut through a process, or routes around a compliance checkpoint because it calculated the outcome would be the same, you may have no way to explain or reconstruct that decision. Even if the outcome was correct, the process isn’t defensible.</p><p>Beyond audit ability, financial services logic is often built on hard rules, regulatory requirements, actuarial constraints, compliance conditions, that can’t be left to probabilistic judgment. <strong>AI is genuinely good at handling semantic ambiguity: interpreting unclear inputs, classifying unstructured data, making judgment calls in the grey zone.</strong> But navigating complex business rules with no room for error is a different task. Forcing an agent to handle both types of work autonomously is how you get confident-sounding outputs with subtle compliance errors embedded in them.</p><p>What actually lands in practice is a more constrained architecture: <strong>the agent operates within a defined scope. </strong>You identify the parts of your workflow where language understanding or judgment of ambiguous inputs creates real value. You let AI own those parts. You keep humans in the loo or keep hard rules in place, for the decisions where audit ability and rule-fidelity are non-negotiable. The agent isn’t replacing the process. It’s handling the parts of the process that were previously slow, inconsistent, or bottlenecked by human attention.</p><p>This feels less exciting than “autonomous agent.” But it’s what actually works, and it’s where the real value sits.</p><h3><strong>After Go-Live: The Maintenance Problem No One Plans For</strong></h3><p>Traditional software has a property that teams in financial services are very comfortable with: it’s stable. Once a system is deployed and running, it mostly keeps working. It doesn’t drift. Unless you change the code, the behavior doesn’t change.</p><p>AI models are different, and that difference creates operational challenges that most teams aren’t ready for.</p><p><strong>The existing go-live review process was designed for traditional software.</strong> In most financial institutions, the checklist covers system response time, error rates, availability, and integration stability. Those are reasonable things to validate for a traditional system. For an AI model, they miss the most important questions: Is the accuracy distribution still within acceptable bounds? Are confidence scores calibrated appropriately? Are there categories where the model’s performance has degraded? Are edge cases being handled correctly?</p><p>These questions aren’t on standard go-live checklists, and most teams don’t have an established process for evaluating them. So you end up with a model that passes review by traditional criteria, goes live, and then starts generating complaints from business units six months later, by which point the performance issue has been compounding for a while.</p><p><strong>Models drift. </strong>The data distribution your model was trained on will, over time, stop reflecting the data it sees in production. Business conditions change. Customer behavior shifts. The model doesn’t adapt automatically. Without a feedback loop, a mechanism that captures corrections made by human reviewers and routes them back into the model’s training data, performance will erode silently.</p><p>The operational implication is that deploying an AI model requires maintaining it as a living system. <strong>That means monitoring accuracy metrics continuously, not just at deployment.</strong> It means building feedback loops that capture human corrections and use them to improve the model over time. It means revisiting the model’s performance when the underlying data changes significantly.</p><p>Planning for this at the start of a project, building monitoring and feedback mechanisms into the scope from day one is much less painful than retrofitting them after the fact.</p><h3><strong>So Does Agentic AI Have a Future in Financial Services?</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*B6FcVV5NbFqAtzDj8VPELw.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@nahrizuladib?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Nahrizul Kadri</a> on <a href="https://unsplash.com/photos/a-sign-with-a-question-mark-and-a-question-mark-drawn-on-it-OAsF0QMRWlA?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>Yes. But it looks different from what most people are imagining.</p><p>The scenario where an AI agent autonomously takes on a full workflow, making decisions, orchestrating its own steps, operating without a defined scope, faces genuine structural obstacles in financial services. Compliance requirements, audit ability constraints, and the architecture of existing systems all push against that model. For most institutions, it’s not a near-term reality.</p><p>What is achievable, and what I’ve seen create real value, is a more targeted deployment: i<strong>dentify the specific parts of your workflows where handling ambiguous language, interpreting unstructured inputs, or processing high volumes of variable content is the bottleneck.</strong> Let AI own those parts, within a defined scope, with clear human review triggers where confidence is low or decisions are high-stakes. Build monitoring in from the start.</p><p>That framing, AI handling the semantic judgment work that humans find slow and inconsistent, within boundaries the organization has explicitly defined is less dramatic than “autonomous AI employees.” But it’s how AI actually delivers sustainable value in regulated environments, and it’s a foundation you can build on as trust and infrastructure mature over time.</p><blockquote>Projects that set expectations too high tend to collapse under the weight of their own ambitions. Projects that set expectations accurately tend to keep running — and keep improving.</blockquote><p><em>Next up: We’ll get back to the practical framework, how to manage AI costs. Once you’ve decided to adopt AI, how do you design a layered model architecture that finds a realistic balance between accuracy and cost?</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4af619d449b6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Golden Dataset: The Foundation Most AI Teams Don’t Know They’re Missing]]></title>
            <link>https://panyo973000.medium.com/golden-dataset-the-foundation-most-ai-teams-dont-know-they-re-missing-aa805edbe3c6?source=rss-9e7d44e21f55------2</link>
            <guid isPermaLink="false">https://medium.com/p/aa805edbe3c6</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[financial-services]]></category>
            <category><![CDATA[ai-transformation]]></category>
            <dc:creator><![CDATA[pan]]></dc:creator>
            <pubDate>Fri, 24 Apr 2026 14:55:01 GMT</pubDate>
            <atom:updated>2026-04-24T14:55:01.641Z</atom:updated>
            <content:encoded><![CDATA[<p>Your requirements document tells the model what you want. A Golden Dataset tells it what “right” actually looks like.</p><p>A few months into one of our AI projects, a business unit lead pushed back when I asked for labeled historical data.</p><p>“We’ve always just given the engineering team a few sample cases. Why do you need hundreds of examples? Isn’t that basically the same thing?”</p><p>It’s a reasonable question if you’ve only worked with traditional software. But it reflects a misunderstanding that quietly derails more AI projects than almost anything else — the belief that use cases and a Golden Dataset are just different sizes of the same thing.</p><p>They’re not. They serve fundamentally different purposes, and confusing the two is how teams end up with a model that seems to work during testing and falls apart in production.</p><h3><strong>Use Cases Tell Engineers. Golden Datasets Teach Models.</strong></h3><p>In traditional software development, use cases are written for engineers. They describe business logic — what triggers a feature, what the user flow looks like, what the system is supposed to do. Use cases are communication artifacts. They exist so that the humans building the system understand what’s expected.</p><p>A Golden Dataset is something else entirely. It’s not written for people. It’s built for the model.</p><p>A Golden Dataset consists of real input examples — drawn from actual business operations — paired with correct answers that domain experts have labeled by hand. The model learns from these examples what a given type of input should map to, not by reading rules, but by generalizing from demonstrated answers.</p><p>Here’s the simplest way I’ve found to explain the difference: <strong>a use case defines the requirement; a Golden Dataset defines the answer.</strong></p><p>You can actually build an AI system without a complete requirements document — but you cannot build one without a Golden Dataset. Without it, the model has no grounding for what “correct” even means. You’re not giving it instructions. You’re giving it nothing.</p><h3><strong>Why It Has to Be Built by Domain Experts</strong></h3><p>This is the part that generates the most resistance. When I tell business teams that they need to be the ones doing the labeling — not the tech team, not an outsourced annotation vendor — the response is usually some version of: “That’s not our job. That’s a technical task.”</p><p>It’s not.</p><p>Labeling is not a mechanical classification exercise. I<strong>t’s the process of converting years of accumulated business judgment into a form that a model can actually learn from.</strong> When a domain expert looks at a record and decides it belongs in category A rather than category B, they’re not just applying a label — they’re encoding domain knowledge that doesn’t exist anywhere in writing.</p><p>If that work gets handed off to someone who doesn’t understand the business, the resulting labels will carry systematic errors. The model learns the wrong logic. And here’s the insidious part: the errors are hard to catch, because the model’s outputs will look approximately right most of the time — the problems show up in edge cases, in subtle misclassifications, in the kinds of errors that only someone who deeply understands the domain can recognize.</p><p>By the time you discover the issue in production, you’re facing a costly re-labeling and retraining cycle that would have been entirely avoidable.</p><p><strong>When a business unit asks me why they have to do the labeling themselves, my answer is always the same: because only you know what the right answer is. This isn’t a data task. It’s the digitization of your team’s expertise.</strong></p><h3><strong>What Actually Makes a Good Golden Dataset</strong></h3><p>Having labeled data isn’t enough on its own. The quality and structure of the dataset determines what the model can actually learn. Here’s what I look for in practice:</p><p><strong>Volume per category.</strong> For classification tasks, aim for at least 50–100 examples per category. The more categories you have, the larger the overall dataset needs to be. In one project I worked on, we had 13 categories and roughly 200 total examples — about 15 per category. That’s too thin. Models trained on sparse categories produce inconsistent results, especially on minority classes. If data is limited, prioritize adding examples to your worst-performing categories rather than adding evenly across the board.</p><p>And if your categories are naturally imbalanced — far more normal cases than edge cases, for instance — you need to deliberately oversample the minority categories. Otherwise the model learns to default to the majority class, which is exactly the wrong behavior when it matters most.</p><p><strong>Inter-rater consistency.</strong> Take a sample of your dataset and have two domain experts label it independently. Compare the results. If agreement falls below 85%, you have an alignment problem — <strong>the labeling criteria aren’t clear enough</strong>, and people are applying different judgment to the same cases. Before you continue labeling, you need to surface and resolve those disagreements. A dataset built on misaligned standards teaches the model contradictory signals.</p><p><strong>Edge case representation.</strong> Most teams’ Golden Datasets skew heavily toward clean, standard examples. That’s a mistake. Models tend to perform reasonably well on straightforward cases regardless — the real challenge is ambiguous, atypical, or boundary-case inputs. I recommend targeting at least 20–30% edge cases in your dataset. If your model has never seen a weird input during training, it will not handle weird inputs well in production.</p><p><strong>Proper train/test split.</strong> This is a structural issue I see overlooked frequently. Your Golden Dataset needs to be divided into two separate portions: a training set the model learns from, and a test set used to evaluate performance. The test set must contain examples the model has never seen during training — otherwise your accuracy numbers are meaningless. A common split is 80/20, but more important than the ratio is ensuring your test set covers diverse input types. If your test set is too easy, you’ll get inflated accuracy estimates and a rude awakening after deployment.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*b73aG_j7FZbM5d3oGMB53w.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@jankolar?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Jan Antonin Kolar</a> on <a href="https://unsplash.com/photos/brown-wooden-drawer-lRoX0shwjUQ?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><h3><strong>Four Situations Where You’ll Realize You Need It</strong></h3><p>Once you understand what a Golden Dataset is, it becomes easier to see how many different situations call for it:</p><p><strong>During initial development.</strong> This is the most obvious use. The dataset is how the model learns its initial behavior. Without it, there’s nothing to train on.</p><p><strong>Before launch, for acceptance testing.</strong> Instead of running a handful of ad hoc test cases and saying “looks good,” you evaluate against a test set and report objective accuracy metrics. This moves acceptance criteria from “the engineers think it works” to “it achieves X% accuracy across Y test cases.” That’s a standard that’s actually meaningful.</p><p><strong>When performance starts to degrade.</strong> Models don’t stay stable forever. Business conditions change, data distributions shift, models get updated. When accuracy starts dropping, running the Golden Dataset as a regression benchmark lets you quickly identify which categories have degraded and why. Without it, you’re reviewing errors case by case, which is slow and imprecise.</p><p><strong>When you’re comparing versions.</strong> Switching to a newer model? Revising your prompt design? The Golden Dataset gives you a quantitative baseline for comparison. “The new model improved overall accuracy from 82% to 88% — but accuracy on product category C dropped from 90% to 75%.” You can only see that kind of detail when you have a baseline to compare against. Without one, you’re relying on gut feel, and gut feel is not a reliable evaluation framework.</p><h3><strong>Why Most Teams Still Don’t Have One</strong></h3><p>The honest answer is that it’s a cultural and framing problem more than a technical one.</p><p>Business units don’t see labeling as their responsibility. It looks like tech work, so they assume it belongs to the engineering team. And because no one explains the connection between labeled data and model quality, they don’t realize what’s actually at stake.</p><p>There’s also a visibility problem. Writing a requirements document produces a tangible artifact — a document you can point to and say, “we did this.” Labeling hundreds of historical records feels more like doing the tech team’s admin work. The value isn’t obvious until something goes wrong.</p><p>And most teams are in a hurry. There’s pressure to show results quickly, so the Golden Dataset gets deferred — “we’ll add more examples once we see how it performs.” But without a proper baseline from the start, “how it performs” has no objective meaning. You’re evaluating a model with no measurement standard.</p><h3><strong>Both Documents Matter</strong></h3><p>One clarification worth making explicit: none of this is an argument against requirements documents. They serve a different purpose, and you still need them.</p><p><strong>Requirements documents create shared understanding among humans</strong> — what the feature is supposed to do, what the boundaries are, when human review should be triggered. Those are team coordination artifacts, and AI doesn’t replace the need for them.</p><p><strong>Golden Datasets create shared understanding between humans and models</strong> — demonstrating, through examples, what the right answer looks like in practice.</p><p>Both are necessary. The problem is that everyone already knows requirements documents need to be written. The Golden Dataset is what consistently gets skipped — which is precisely why it keeps causing problems.</p><p><strong>A Golden Dataset isn’t preliminary work before the real AI project starts. It is the real AI project. The sooner that’s understood, the smoother everything else tends to go.</strong></p><p><em>Next in this series, I’ll step back from the development process and look at a bigger question: can Agentic AI actually work in financial services? Everyone’s talking about AI agents right now — but the practical realities are more complicated than the pitch decks suggest.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=aa805edbe3c6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Software 1.0 vs 2.0: Why Most AI Projects in Financial Services Are Built the Wrong Way]]></title>
            <link>https://medium.com/the-generator/software-1-0-vs-2-0-why-most-ai-projects-in-financial-services-are-built-the-wrong-way-d031e31f1b7f?source=rss-9e7d44e21f55------2</link>
            <guid isPermaLink="false">https://medium.com/p/d031e31f1b7f</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[financial-services]]></category>
            <category><![CDATA[digital-transformation]]></category>
            <category><![CDATA[ai-strategy]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[pan]]></dc:creator>
            <pubDate>Wed, 15 Apr 2026 03:01:17 GMT</pubDate>
            <atom:updated>2026-04-15T03:01:17.929Z</atom:updated>
            <content:encoded><![CDATA[<p>The problem isn’t the model. It’s the mindset.</p><p>I’ve sat through a lot of AI requirements meetings. And after a while, you start to notice a pattern.</p><p>Someone from the business unit opens a Word document and starts reading rules out loud. “If field A contains X, classify as category one. If Y and Z appear together, route to the exception flow first…” The list grows. Thirty conditions. Forty. Each one spawning two more edge cases.</p><p>Near the end of the meeting, I ask a question I’ve learned to ask early: “When your team handles this manually today, what’s your accuracy rate?”</p><p>A pause.</p><p>“It depends. Sometimes different people give different answers.”</p><p>That’s the moment the real problem becomes visible. The team isn’t struggling because they picked the wrong model or wrote bad prompts. They’re struggling because they’re trying to build AI the same way they’ve always built software — and those two things require fundamentally different ways of thinking.</p><h3>The Core Difference Between Software 1.0 and 2.0</h3><p>Traditional software development — what Andrej Karpathy famously called Software 1.0 — runs on explicit logic. Engineers define every rule. Every edge case gets handled. Given input A, you always get output B. Zero errors is the baseline expectation, not a stretch goal.</p><p>This approach works beautifully for deterministic problems. And in financial services, where business logic is built on regulations, actuarial rules, and compliance requirements, Software 1.0 has been the foundation for decades.</p><p>But AI development — Software 2.0 — works differently. Instead of writing rules, you define a goal and provide data. The model learns patterns from examples rather than following instructions you’ve written line by line. The output isn’t deterministic. Every result comes with a confidence score. Uncertainty isn’t a bug — it’s a feature of how the system works.</p><p>Three dimensions capture the gap:</p><p><strong>Where logic comes from.</strong> In traditional development, engineers write the logic explicitly. In AI development, the model infers logic from labeled data. Your job shifts from “enumerate every scenario” to “provide representative examples and let the model generalize.”</p><p><strong>What the output looks like.</strong> Traditional software is deterministic — same input, same output, every time. AI outputs are probabilistic — the same input might produce slightly different results, and every output carries a confidence level. Managing that uncertainty is part of the job.</p><p><strong>What you optimize for.</strong> Traditional development focuses on whether each step in a process executes correctly. AI development focuses on whether the overall accuracy distribution falls within an acceptable range. You’re not debugging individual cases — you’re managing a distribution.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YftEX0BadRkJJnR1DrLB7g.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@silverkblack?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Vitaly Gariev</a> on <a href="https://unsplash.com/photos/team-collaborating-with-sticky-notes-on-glass-wall-TSyD0nGc0Bs?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><h3>What This Looks Like in a Real Meeting</h3><p>Abstract frameworks are easy to agree with and hard to apply. So here’s what the difference actually looks like in practice.</p><p><strong>The Software 1.0 version of a requirements meeting:</strong></p><p>The business unit arrives with a document. They walk through their rules: product name contains keyword A, map to code 001 or 003; contains keyword B, check field C first; enterprise clients follow a different logic entirely…</p><p>The engineer takes notes, trying to translate everything into code. The business unit keeps remembering exceptions. An hour later, there are fifty rules on the whiteboard, and everyone knows there are more they haven’t thought of yet.</p><p><strong>The Software 2.0 version:</strong></p><p>I stop the rules discussion early. “<strong>Before we get into the logic — what does success look like? What accuracy rate would make this worth deploying?</strong>”</p><p>That question reorients the room. Now we’re talking about outcomes, not procedures.</p><p>Then: “<strong>Do you have historical data — cases your team has already reviewed, with the correct answers recorded?</strong>”</p><p>This is the shift. I’m not asking them to describe their rules. I’m asking them to show me their answers. Because in AI development, labeled examples are the specification. They’re more valuable than any document full of if-then statements.</p><h3>Two Questions That Change How Requirements Meetings Go</h3><p>If you’re working on AI projects in financial services, these two questions are worth building into every requirements conversation:</p><p><strong>“What does success look like — and what accuracy rate would make this worth deploying?”</strong> This pulls the discussion away from rule enumeration and toward outcome definition. It also forces an early conversation about acceptable error rates, which is much better than discovering disagreements during UAT.</p><p><strong>“Do you have historical cases with known correct answers?”</strong> This signals clearly: what I need isn’t a description of your rules. It’s a demonstration of your answers. Labeled data is the foundation AI actually learns from.</p><p>Most of the time, asking these two questions early changes the entire shape of the project.</p><h3>One Important Clarification</h3><p>Saying “shift from rules to goals” <strong>doesn’t mean rules stop mattering in financial services.</strong> Some logic is non-negotiable — regulatory requirements, actuarial constraints, specific compliance conditions. These can’t be left to a model to figure out. Getting them wrong isn’t an accuracy problem. It’s a compliance problem.</p><p>The real skill is knowing which parts of a problem are appropriate for AI to handle — semantic judgment, ambiguous language, unstructured input — and which parts need hard rules as guardrails. That boundary is where most of the interesting design work happens, and it’s something I’ll go deeper on in a future piece.</p><h3>A Quick Self-Assessment</h3><p>Before wrapping up, here are five questions worth asking about your current AI projects:</p><ol><li>In requirements meetings, does your business unit instinctively start listing rules — or describing goals?</li><li>Is your acceptance criteria “all cases must be correct” or “overall accuracy must reach X%”?</li><li>When the model gets something wrong, is the first instinct to add a rule — or to add that case to the training data?</li><li>Do you have just a requirements document? or a labeled dataset built by domain experts?</li><li>Have you asked the model handle everything? or a human review trigger for low-confidence outputs?</li></ol><p>If most of your answers land on the first option, your team is still operating in Software 1.0 mode. That’s not a criticism — it describes most teams right now. But recognizing the gap is the first step toward closing it.</p><p><em>This is part of an ongoing series on practical AI adoption in financial services, based on my experience working on AI transformation at a financial holding company in Taiwan. Next up: what Golden Dataset actually means, why it matters more than your requirements document, and how to build one that’s actually useful.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d031e31f1b7f" width="1" height="1" alt=""><hr><p><a href="https://medium.com/the-generator/software-1-0-vs-2-0-why-most-ai-projects-in-financial-services-are-built-the-wrong-way-d031e31f1b7f">Software 1.0 vs 2.0: Why Most AI Projects in Financial Services Are Built the Wrong Way</a> was originally published in <a href="https://medium.com/the-generator">The Generator</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Three Mistakes That Kill AI Projects in Financial Services Before They Start]]></title>
            <link>https://panyo973000.medium.com/three-mistakes-that-kill-ai-projects-in-financial-services-before-they-start-6b51dd930918?source=rss-9e7d44e21f55------2</link>
            <guid isPermaLink="false">https://medium.com/p/6b51dd930918</guid>
            <category><![CDATA[digital-transformation]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[financial-services]]></category>
            <category><![CDATA[ai-strategy]]></category>
            <dc:creator><![CDATA[pan]]></dc:creator>
            <pubDate>Mon, 13 Apr 2026 15:09:16 GMT</pubDate>
            <atom:updated>2026-04-13T15:09:16.087Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DamD7MSxFZEdBKwkRRQ_Zg.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@silverkblack?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Vitaly Gariev</a> on <a href="https://unsplash.com/photos/man-rubbing-his-face-in-front-of-laptop-bl7h_R-PKpU?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>Most AI projects don’t fail because of bad technology. They fail because of flawed thinking.</p><p>After working on AI transformation in the financial industry for some time, I’ve noticed a pattern: most projects don’t fail because the technology isn’t good enough. They fail because teams are using the right tools in the wrong way.</p><p>Here are three execution mistakes I see over and over again. If you’re driving AI adoption at your organization — or if your project has been stuck for a while — there’s a good chance you’re dealing with at least one of them right now.</p><h3>Mistake #1: Using AI to Cover Up Inefficiency</h3><p>Here’s a scenario I’ve encountered more times than I can count:</p><p>A business unit has a messy, poorly documented process that’s been running on manual judgment for years. One day, leadership says, “Let’s bring in AI.” So everyone starts discussing how to get an LLM to handle the work.</p><p>The problem? No one can clearly explain what the decision logic actually is.</p><p><strong>If your team can’t articulate the rules behind a process, you can’t expect AI to figure it out for you.</strong> I’ve sat in countless requirement meetings where, after digging in, it became clear that the business unit couldn’t describe their own decision criteria — or that the task was actually a straightforward rule-based process that could’ve been handled by RPA or traditional code, with no need for an expensive LLM at all.</p><p>LLMs excel at handling semantic ambiguity — tasks that require understanding intent, interpreting context, or processing unstructured data. If the logic is clear and rule-based, use traditional software. If the process itself is broken, AI won’t fix it. It’ll just make the chaos move faster.</p><p><strong>The key: Clarify before you automate.</strong> Map out and clean up the process first. That’s not extra work — it’s the prerequisite for AI to deliver any real value.</p><h3>Mistake #2: Automating the Wrong Thing — Retracing Old Steps with New Tools</h3><p>Here’s another pattern I see constantly:</p><p>The existing workflow is A → B → C → D. Steps B and C are done manually. So when AI comes into the picture, the natural instinct is: “Let’s have AI do B and C.”</p><p>This seems logical. But it’s a trap.</p><p><strong>You’re just replacing human labor inside a process that may already be flawed — not using AI to actually improve the process itself.</strong></p><p>The better question isn’t “Which steps can AI take over?” It’s “If we had AI, what should this process look like from scratch?”</p><p>For example: if the current workflow requires someone to manually check ten fields, AI shouldn’t just automate those ten checks. It should prompt you to ask: Which fields can be merged? Which validations can happen earlier? What’s the actual goal here, and what’s the most direct path to it?</p><p><strong>The key: Shift from task-based to goal-based thinking.</strong> Don’t ask AI to complete every step in your current workflow. Ask AI to help you reach the same outcome with fewer steps. Optimizing a broken process just produces wrong results faster.</p><h3>Mistake #3: Demanding Zero Errors from a Probabilistic System</h3><p>This one is especially common in financial services, where accuracy standards are high by necessity. Customer accounts, regulatory compliance, credit decisions — precision matters. So when AI enters the picture, the expectation naturally follows: it needs to be 100% accurate before we can go live.</p><p>The problem is that AI doesn’t work that way.</p><p><strong>Traditional software is deterministic. Given input A, you always get output B. LLMs are probabilistic — every output comes with a confidence score, and uncertainty is a feature, not a bug.</strong></p><p>When you demand zero errors from a probabilistic system, a few things tend to happen: you pile on rules and exception handling to cover every edge case, driving up costs significantly; the project stalls every time AI gets one case wrong; and you end up over-engineering a rigid system that’s lost all its flexibility.</p><p>A better approach: accept the probabilistic nature of AI, and reframe the question. Instead of “Can AI get this 100% right?” ask “What error rate can we tolerate, and what’s our plan when errors do happen?”</p><p>This means designing a confidence-based routing system — when AI’s confidence is above a threshold, auto-approve; below it, route to human review. You get the efficiency of AI where it works well, and human oversight where it matters most. That’s a far more practical model for financial services.</p><p><strong>The key: Stop chasing absolute accuracy. Start managing your acceptable error range.</strong></p><h3>The Common Root of All Three Mistakes</h3><p>Look at these three mistakes together, and you’ll see they share the same origin: <strong>we’re applying a Software 1.0 mindset to Software 2.0 technology.</strong></p><p>Traditional software development is built around defining every rule, anticipating every scenario, and achieving zero errors. AI development works differently — you define the goal, let the model learn from data, and manage uncertainty rather than eliminate it.</p><p>Making that mental shift is the real first step in AI transformation for financial services. The technology is ready. The question is whether our thinking has caught up.</p><p><em>This is the first article in a series on practical AI adoption in financial services — based on my experience working on AI transformation at a financial holding company in Taiwan. Next up: why the way you think about AI development needs to change, and what Software 2.0 actually means in practice.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6b51dd930918" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[從頭開始文字探勘─詞彙重要性(TF-IDF、TextRank)]]></title>
            <link>https://panyo973000.medium.com/%E5%BE%9E%E9%A0%AD%E9%96%8B%E5%A7%8B%E6%96%87%E5%AD%97%E6%8E%A2%E5%8B%98-%E8%A9%9E%E5%BD%99%E9%87%8D%E8%A6%81%E6%80%A7-tf-idf-textrank-478221db3839?source=rss-9e7d44e21f55------2</link>
            <guid isPermaLink="false">https://medium.com/p/478221db3839</guid>
            <category><![CDATA[tf-idf]]></category>
            <category><![CDATA[text-mining]]></category>
            <dc:creator><![CDATA[pan]]></dc:creator>
            <pubDate>Wed, 08 Oct 2025 02:50:02 GMT</pubDate>
            <atom:updated>2025-10-08T03:08:39.157Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OgOmIye32CPbRjW8B5SVRA.png" /></figure><p>之前的文章我們介紹了如何對文字進行分析前的預處理，忘記做了甚麼事的捧友，可以動動手指回去從頭複習！👇👇👇</p><p><a href="https://panyo973000.medium.com/%E5%BE%9E%E9%A0%AD%E9%96%8B%E5%A7%8B%E6%96%87%E5%AD%97%E6%8E%A2%E5%8B%98-%E8%A9%9E%E6%80%A7%E6%A8%99%E8%A8%98part-of-speech-pos-tagging-5dd344a6af3d">從頭開始文字探勘─詞性標記Part-of-speech(POS) tagging</a></p><p>本篇的主題要來討論，既然我們已經將一篇文章切分成多個詞彙，也將字詞都還原為原形，那這些資料可以為我們帶來甚麼資訊？他們又有甚麼樣的價值呢？</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*3IHXB3qf428qoRqiziEvRA.gif" /></figure><p>通常在做自然語言分析時我們會先找出能代表該篇文章的重要詞彙或是文章中被提及最多次的詞彙等，但我們又該如何知道哪些詞彙對我們來說是重要的呢？哪些詞彙又是足以代表該文章的呢？這時候我們就需要進行詞彙重要性的判斷。</p><p>詞彙重要性的判斷有許多的方法，每種方法都有各自背後解讀的邏輯，不同的方法也都各自有其優缺點，從自然語言處理相關的paper中可以看到各式各樣的方法，而我就以自己做研究時所研究的方法做介紹。</p><h3><em>TF-IDF</em></h3><p><em>TF-IDF</em>的全名是<em>Term Frequency — Inverse Document Frequency</em>，是在自然語言處理中計算詞彙權重並用來判斷詞彙對文章重要性的方法，是常見的分析工具之一。<em>TF-IDF</em>的原理是透過計算詞頻<em>(TF)</em>分數和逆文件頻率<em>(IDF)</em>分數來組成完整的<em>TF-IDF</em>分數，分數越高代表該辭彙對文章的重要性也越高。</p><ol><li><strong>詞頻Term Frequency(TF)</strong></li></ol><p>TF分數指的是詞彙在文章中出現的頻率，這是一個很直觀的概念，詞頻較高的詞對一篇文章來說可能有著更高的重要性。舉例來說，當我們發現「agent」這個詞在該文章中佔比為20%，可以簡單的推論「agent」這個詞彙對這篇文章來說有較高的重要性。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/326/1*XglOl153SXOAf1HSs6Qd9Q.png" /><figcaption><em>d</em>指的是特定文件，<em>t</em>指的是某一單詞。</figcaption></figure><p><strong>2. 逆文件頻率 Inverse Document Frequency(IDF)</strong></p><p>IDF分數指的是該詞彙在各個文章中是不是常見的詞，我們會去計算單一詞彙(詞t)總共在幾篇文章出現過，如果這個詞彙出現在越多的文章中，其對應的IDF分數就會越小，代表這個詞彙比較沒有意義。舉例來說，英文中的be動詞「is」幾乎可以在所有的文章中看到，因此就算「is」在文章中出現很多次，實際上對於分析文章內容也沒有太大的幫助，因此IDF值較低，反之如果有個詞彙在單一文章中出現多次，但並沒有出現在多篇文章，那麼我們就可以推論這個單詞是可以代表這篇文章的。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/266/1*KuGxpyxCx3usE_OtwzM5Qg.png" /><figcaption><em>D</em>指的是所有文件的總數。</figcaption></figure><p>計算完TF和IDF分數後，將其相乘我們就可以得到最終的分數。如果某個單詞在該文章中出現的佔比高(TF分數高)並且很少出現在其他的文章中(IDF分數高)，整體的TF-IDF值就會越大，也就代<strong>表這個單詞對這篇的文章重要性越高</strong>。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/372/1*UxD5Y4QsuAEmnpwDOqLjQw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5koemk5hjCWpH7gZx67U1A.png" /></figure><pre># coding: utf-8<br>import pandas as pd<br>from sklearn.feature_extraction.text import TfidfVectorizer</pre><pre># Documents<br>doc_0 = &quot;Ukraine war: Western agents seek to get inside Putin’s head&quot;<br>doc_1 = &quot;New Zealand scraps outdoor masking, some Covid vaccine mandates&quot;<br>doc_2 = &quot;Covid vaccine: How fast is progress around the world?&quot;<br>doc_3 = &quot;Putin has redrawn the world — but not the way he wanted&quot;<br>doc_all = [doc_0, doc_1, doc_2,doc_3]</pre><pre># TF-IDF<br>vectorizer = TfidfVectorizer(smooth_idf=True)<br>tfidf = vectorizer.fit_transform(doc_all)<br>result = pd.DataFrame(tfidf.toarray(), columns=vectorizer.get_feature_names())<br>print(result)</pre><p>結果如下圖：</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/543/1*aw-Z-lYB8zGEDDvS-J7cdw.png" /></figure><p>TF-IDF是一個簡單、容易理解的概念，可以幫助分析者快速找出重要和不重要的單詞，但就像文章開頭所說，除了TD-IDF方法外還有許多方法可以找出一段文本中重要或具代表性的單詞，大家可以多方研究研究呦！！！</p><p>我們終於在文字探勘的路上有點進度啦！！！！！改天再見嘿</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/320/1*sY1HbMUJqrMABMsmhmqBJQ.gif" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=478221db3839" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[從頭開始文字探勘─詞性標記Part-of-speech(POS) tagging]]></title>
            <link>https://panyo973000.medium.com/%E5%BE%9E%E9%A0%AD%E9%96%8B%E5%A7%8B%E6%96%87%E5%AD%97%E6%8E%A2%E5%8B%98-%E8%A9%9E%E6%80%A7%E6%A8%99%E8%A8%98part-of-speech-pos-tagging-5dd344a6af3d?source=rss-9e7d44e21f55------2</link>
            <guid isPermaLink="false">https://medium.com/p/5dd344a6af3d</guid>
            <category><![CDATA[pos-tagging]]></category>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[nltk]]></category>
            <category><![CDATA[text-mining]]></category>
            <dc:creator><![CDATA[pan]]></dc:creator>
            <pubDate>Fri, 25 Mar 2022 07:05:08 GMT</pubDate>
            <atom:updated>2025-10-17T06:56:39.235Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ad2hvXv7WFUNpCscjp9piQ.png" /></figure><p><a href="https://panyo973000.medium.com/%E5%BE%9E%E9%A0%AD%E9%96%8B%E5%A7%8B%E6%96%87%E5%AD%97%E6%8E%A2%E5%8B%98-%E8%A9%9E%E5%B9%B9%E6%8F%90%E5%8F%96stemming-%E8%A9%9E%E6%80%A7%E9%82%84%E5%8E%9Flemmatization-113fe526d173">從頭開始文字探勘─詞幹提取Stemming、詞性還原Lemmatization</a></p><p>開始新的單元前，先簡單回顧一下上一篇文章吧！</p><p>詞性標記Part-of-speech(POS) tagging在自然語言處理中是重要的一環。在上一篇我們提到，詞性還原Lemmatization的時候可能會因為沒有指定該單詞的詞性因此造成還原誤差，導致無法完整的還原原始文章的意義，而我們就可以透過詞性標記來進行詞義消歧(Word Sense Disambiguation)；此外，根據研究目標的不同，也可以透過篩選詞性來留下自己想要的單詞，現今多數的研究都是針對名詞、形容詞、動詞去做分析。</p><p><strong>詞性標記Part-of-speech(POS) tagging</strong>顧名思義就是幫每個單詞做詞性的標記，從下圖我們可以看到一句包含對等連接詞、介係詞、副詞、名詞和形容詞的句子。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/855/1*cUbWtgN9bVWlhpCaHvookg.png" /></figure><p>這些詞性是我們平常所熟悉的表達方式，但在自然語言的處理邏輯中，他們分別會被電腦標記成<em>CC、RB、IN、NN、JJ</em>。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/834/1*epCzHPIEe-TqIFfRdLCFfg.png" /></figure><p>下方提供了Tag和詞性的對照表</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/956/0*mdgyFdVPTchMlTpL.png" /><figcaption>Williams, S. (2013). An Analysis of POS Tag Patterns in Ontology Identifiers and Labels.</figcaption></figure><p>由於自然語言處理是透過電腦來判斷人們想表達的意思，而人類所能表達的詞彙是非常複雜的，同樣的單詞可能有不同的意思，根據時間變動單詞的涵義也可能跟著演變，詞性標記這個步驟可以協助電腦進一步處理並解析這些字詞，雖然只是一個簡單的步驟，但卻是自然語言處理中不可或缺的。</p><pre>from nltk.tokenize import word_tokenize</pre><pre>text = word_tokenize(&quot;And now for something completely different&quot;)<br>nltk.pos_tag(text)</pre><p>結果就會如下：</p><pre>[(&#39;And&#39;, &#39;CC&#39;), (&#39;now&#39;, &#39;RB&#39;), (&#39;for&#39;, &#39;IN&#39;), (&#39;something&#39;, &#39;NN&#39;),<br>(&#39;completely&#39;, &#39;RB&#39;), (&#39;different&#39;, &#39;JJ&#39;)]</pre><p>至於電腦們是怎麼判斷每個單詞究竟是甚麼詞性，其實有許多不同的計算方式，下方這篇文章中有詳細介紹POS tagging的計算方式，有興趣的人可以點進去看看！</p><p><a href="https://towardsdatascience.com/part-of-speech-tagging-for-beginners-3a0754b2ebba">Part Of Speech Tagging for Beginners</a></p><p>自然語言分析的預處理步驟大致上告一個段落，接下來的環節會進行相關的分析工作，產出實際有幫助的一些結果！下次見囉！</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*538rVX6omTE3KTcgaeJawA.gif" /></figure><p><a href="https://panyo973000.medium.com/%E5%BE%9E%E9%A0%AD%E9%96%8B%E5%A7%8B%E6%96%87%E5%AD%97%E6%8E%A2%E5%8B%98-%E8%A9%9E%E5%BD%99%E9%87%8D%E8%A6%81%E6%80%A7-tf-idf-textrank-478221db3839">從頭開始文字探勘─詞彙重要性(TF-IDF、TextRank)</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5dd344a6af3d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[從頭開始文字探勘─詞幹提取Stemming、詞性還原Lemmatization]]></title>
            <link>https://panyo973000.medium.com/%E5%BE%9E%E9%A0%AD%E9%96%8B%E5%A7%8B%E6%96%87%E5%AD%97%E6%8E%A2%E5%8B%98-%E8%A9%9E%E5%B9%B9%E6%8F%90%E5%8F%96stemming-%E8%A9%9E%E6%80%A7%E9%82%84%E5%8E%9Flemmatization-113fe526d173?source=rss-9e7d44e21f55------2</link>
            <guid isPermaLink="false">https://medium.com/p/113fe526d173</guid>
            <category><![CDATA[nlp]]></category>
            <category><![CDATA[nltk]]></category>
            <category><![CDATA[lemmatization]]></category>
            <category><![CDATA[stemming]]></category>
            <category><![CDATA[data-analysis]]></category>
            <dc:creator><![CDATA[pan]]></dc:creator>
            <pubDate>Fri, 25 Mar 2022 01:38:02 GMT</pubDate>
            <atom:updated>2025-10-17T06:55:52.989Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FN2w5N9gWe_COgnTLPwXVQ.png" /></figure><p><a href="https://panyo973000.medium.com/%E5%BE%9E%E9%A0%AD%E9%96%8B%E5%A7%8B%E6%96%87%E5%AD%97%E6%8E%A2%E5%8B%98-%E6%96%B7%E8%A9%9E%E6%96%B7%E5%8F%A5-%E5%81%9C%E7%94%A8%E5%AD%97%E5%8E%BB%E9%99%A4-638fe6c3bcae">從頭開始文字探勘─斷詞斷句、停用字去除</a></p><p>上一篇文章介紹了如何對一大篇文章進行簡單處理，將文章拆解並把一些沒有意義的詞彙去除，去蕪存菁！點上面連結可以回顧👆！</p><p>本篇就要來討論<strong>「詞幹提取Stemming」</strong>和<strong>「詞性還原Lemmatization」</strong>，詞幹提取和詞性還原可以說是針對英文文章進行自然語言處理中的獨有步驟，原因在於英文單詞存在豐富的變形，若沒有經過這些處理，將詞彙還原到最基礎的型態，會使整個分析過於雜亂且沒有辦法忠實呈現分析結果。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*LE4jJIc9f-qVQFy6AeISig.gif" /></figure><p><strong>詞幹提取Stemming</strong></p><p>詞幹提取是<strong>去除詞綴得到詞根</strong>的過程，舉例來說，<em>cat、cats、catty、cat’s</em>等都是基於<em>cat</em>做延伸的單詞，經過詞幹提取的過程電腦可以理解並將這些單詞都還原到最基本的<em>cat</em>，再進行後續分析時(例如：詞頻計算)就可以避免電腦針對<em>cat</em>進行一次處理、針對<em>cats</em>又再次處理、針對<em>catty</em>又進行處理、針對<em>cat’s</em>又處理一次，而這樣處理的結果並沒有太大的意義。</p><pre>from nltk.stem import PorterStemmer<br>stemmer = PorterStemmer()</pre><p><strong>詞性還原Lemmatization</strong></p><p>詞性還原則較好理解，顧名思義就是將單詞的詞性還原到最基本的型態，舉例來說：<em>eating、ate、eaten</em>透過詞性還原可以將其轉變成最基礎的型態，也就是<em>eat；is、are、was</em>的基礎型態則是<em>be；mice</em>的基礎型態則是<em>mouse，</em>這樣的轉換同樣有助於電腦進行後續的分析。</p><pre>from nltk.stem import WordNetLemmatizer <br>lemmatizer = WordNetLemmatizer()</pre><p>由於詞幹提取Stemming後的單詞有可能是無意義的，舉例來說：<em>aquatic</em>經過詞幹的提取後會留下<em>aquat</em>，但<em>aquat</em>實際上並非一個有意義的單詞；詞性還原Lemmatization的問題則在於，可能造成轉換後單詞意義也改變的情況發生，舉例來說：形容詞<em>pleased</em>是「高興的」的意思，但經過詞性還原留下的可能會是<em>please</em>，而<em>please</em>除了「使人開心」的意思外，還會多一個「請」的意義，對於往後的詞頻計算會帶來些許的誤差，但這樣的問題通常可以透過指定單詞詞性來解決。《往後的章節會再介紹詞性標註Part-of-speech(POS) tagging》</p><p>通常在進行文字處理時，我們會從詞幹提取和詞性還原中<strong>擇一</strong>進行，延續我們之前所使用的例子，針對該篇留言進行<strong>詞性還原</strong>，將產生以下的結果：</p><p><em>little/Kodak/take/sharp/perfect/photo/camera/short/time/everything/continue/appear/incline/go/pleased/purchase/Easy/use/clear/focus/feature/seem/function/A-1/order/Upload/computer/without/hitch/say /buy/good/camera</em></p><p>最後，我們簡單做一個大小寫的轉換</p><pre>lower_comment = comment.lower()</pre><p><em>little/kodak/take/sharp/perfect/photo/camera/short/time/everything/continue/appear/incline/go/pleased/purchase/easy/use/clear/focus/feature/seem/function/a-1/order/upload/computer/without/hitch/say /buy/good/camera</em></p><p>相比一開始的整大篇留言我們已經精簡了許多，經過各種處理後，留下對後續分析較有幫助的資訊，就有助於我們進行往後的處理啦。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*i5xcIoSKhS71khxvdP0Hyg.gif" /></figure><p><a href="https://panyo973000.medium.com/%E5%BE%9E%E9%A0%AD%E9%96%8B%E5%A7%8B%E6%96%87%E5%AD%97%E6%8E%A2%E5%8B%98-%E8%A9%9E%E6%80%A7%E6%A8%99%E8%A8%98part-of-speech-pos-tagging-5dd344a6af3d">從頭開始文字探勘─詞性標記Part-of-speech(POS) tagging</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=113fe526d173" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[從頭開始文字探勘─斷詞斷句、停用字去除]]></title>
            <link>https://panyo973000.medium.com/%E5%BE%9E%E9%A0%AD%E9%96%8B%E5%A7%8B%E6%96%87%E5%AD%97%E6%8E%A2%E5%8B%98-%E6%96%B7%E8%A9%9E%E6%96%B7%E5%8F%A5-%E5%81%9C%E7%94%A8%E5%AD%97%E5%8E%BB%E9%99%A4-638fe6c3bcae?source=rss-9e7d44e21f55------2</link>
            <guid isPermaLink="false">https://medium.com/p/638fe6c3bcae</guid>
            <category><![CDATA[文字探勘]]></category>
            <category><![CDATA[nlp]]></category>
            <category><![CDATA[text-mining]]></category>
            <category><![CDATA[data-analysis]]></category>
            <dc:creator><![CDATA[pan]]></dc:creator>
            <pubDate>Thu, 01 Apr 2021 18:41:38 GMT</pubDate>
            <atom:updated>2025-10-17T06:55:02.262Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7z8MvzaTac_ovuz0r0ryoQ.png" /></figure><p><a href="https://panyo973000.medium.com/%E5%BE%9E%E9%A0%AD%E9%96%8B%E5%A7%8B%E6%96%87%E5%AD%97%E6%8E%A2%E5%8B%98-%E6%96%87%E5%AD%97%E6%8E%A2%E5%8B%98%E5%85%A5%E9%96%80%E4%BB%8B%E7%B4%B9-a01429c8c899">從頭開始文字探勘 — 文字探勘入門介紹</a></p><p>上一篇文章中簡單跟大家介紹了文字探勘的基礎，忘記的朋友可以再點回去複習一下~</p><p>今天要來和大家介紹文字探勘資料處理步驟中的<strong>「斷詞斷句」</strong>以及<strong>「停用字(stop words)去除」。</strong>所謂斷詞斷句顧名思義就是，把文章進行拆解，將一篇落落長的文章拆分後變成一句一句的話或是一個一個單詞。</p><ul><li>以文章為單位</li><li>以句子為單位</li><li>以單詞為單位</li></ul><p>就像所有的分析工具，分析上都有一套演進的過程，早期的文字探勘通常針對一小段文章進行研究，但過去學者發現一段文章中不同的句子可能包含不同的情緒，因此將分析單位縮小至一句話；再接著又發現一句話中可能包含對不同事物的表達，所以將分析單位又縮小至一個單詞。</p><p>我們就用真實的資料來看一次吧！以下是消費者針對某一台相機所進行的評論：</p><p><em>⭐️⭐️⭐️⭐️⭐️ this little Kodak takes sharp, perfect photos. I have only had the camera a short time, but if everything continues as it appears to be inclined I am going to be very pleased with my purchase. Easy to use, clear focus, all features seem to function in A-1 order. Uploads to my computer without a hitch. I’d say “ buy it…..good camera”.</em></p><p>若我們直接對這篇文章進行分析，就是最基礎的「以文章為分析單位」，但其實這篇文章是由多句話所組成，以此規則進行文章分解，結果將如下呈現，我們可以看到文章被分為5個句子(廣義上來說的句子是以句號進行分隔)：</p><pre>import nltk<br>nltk.download(‘punkt’)</pre><pre>from nltk.tokenize import sent_tokenize, word_tokenize</pre><p><em>this little Kodak takes sharp, perfect photos. </em><strong><em>/</em></strong><em> I have only had the camera a short time, but if everything continues as it appears to be inclined I am going to be very pleased with my purchase.</em><strong><em> /</em></strong><em> Easy to use, clear focus, all features seem to function in A-1 order. </em><strong><em>/</em></strong><em> Uploads to my computer without a hitch.</em><strong><em> /</em></strong><em> I’d say “ buy it…..good camera”.</em></p><p>細讀每一段句子就會發現，一句話中可能針對一個以上的事物進行意見表達，為了增加分析精準度，我們將句子再進行個詳細的拆分，就可以看到原本完整的文章被我們拆分成一個一個的詞彙：</p><p><em>this/ little/ Kodak/ takes/ sharp/,/ perfect/ photos. /I/ have/ only/ had/ the/ camera/ a/ short/ time/,/ but/ if/ everything/ continues/ as/ it/ appears/ to/ be/ inclined/ I/ am/ going/ to/ be/ very/ pleased/ with/ my/ purchase./</em><strong><em> </em></strong><em>Easy/ to/ use/,/ clear/ focus/, all/ features/ seem/ to/ function/ in/ A-1/ order./ Uploads/ to/ my/computer/ without/ a/ hitch/./</em><strong><em> </em></strong><em>I’d/ say /“/ buy/ it/…../good/ camera/”.</em></p><p>我們可以看到，文章中的許多字詞似乎不太有其意義，因此我們將進行停用字去除的動作，<strong>所謂停用詞就是在處理文字資料時頻繁出現但沒有統計或其他意義上的詞，通常是介系詞、代名詞等等，</strong>因此在進行資料與處理時相把這些單詞進行刪除，增加之後分析上的效率。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/498/1*-pJB7W1k0tHeU3wOewfzlg.gif" /></figure><pre>from nltk.corpus import stopwords<br>nltk.download(‘stopwords’)</pre><p>NLTK套件本身就有提供stop words列表，將其下載後就可以很迅速地對文章進行整理，一些不必要的字詞都被刪除了。</p><p><em>little/Kodak/takes/sharp/perfect/photos/camera/short/time/everything/continues/appears/inclined/going/pleased/purchase/Easy/use/clear/focus/features/seem/function/A-1/order/Uploads/computer/without/hitch/say /buy/good/camera</em></p><p>這時候我們就可以很清楚的知道在這篇文章中討論了這台相機的「畫質」、「上手程度」、「對焦」、「傳輸」「整體評價」等等，第一階段的資料預處理可以說是完成了。至於要怎麼快速的從上百篇、上萬篇文章中抓出被討論的主題，我們將在往後的文章進行介紹。</p><p>今天的文章就到這裡啦~下一篇將介紹下一階段的資料預處理動作，有興趣的朋友隨時發露呦！</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*IZMs4Y8v5prDv4eCDHa6yw.gif" /></figure><p><a href="https://panyo973000.medium.com/%E5%BE%9E%E9%A0%AD%E9%96%8B%E5%A7%8B%E6%96%87%E5%AD%97%E6%8E%A2%E5%8B%98-%E8%A9%9E%E5%B9%B9%E6%8F%90%E5%8F%96stemming-%E8%A9%9E%E6%80%A7%E9%82%84%E5%8E%9Flemmatization-113fe526d173">從頭開始文字探勘─詞幹提取Stemming、詞性還原Lemmatization</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=638fe6c3bcae" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[從頭開始文字探勘 — 文字探勘入門介紹]]></title>
            <link>https://panyo973000.medium.com/%E5%BE%9E%E9%A0%AD%E9%96%8B%E5%A7%8B%E6%96%87%E5%AD%97%E6%8E%A2%E5%8B%98-%E6%96%87%E5%AD%97%E6%8E%A2%E5%8B%98%E5%85%A5%E9%96%80%E4%BB%8B%E7%B4%B9-a01429c8c899?source=rss-9e7d44e21f55------2</link>
            <guid isPermaLink="false">https://medium.com/p/a01429c8c899</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[text-mining]]></category>
            <category><![CDATA[文字探勘]]></category>
            <dc:creator><![CDATA[pan]]></dc:creator>
            <pubDate>Tue, 09 Feb 2021 15:46:42 GMT</pubDate>
            <atom:updated>2025-10-17T07:44:22.471Z</atom:updated>
            <content:encoded><![CDATA[<h3>從頭開始文字探勘 — 文字探勘入門</h3><h4>寫給0基礎的我/你，全方位文字探勘介紹</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*E-O4AIWcXtCbDOJGRi1JBA.png" /></figure><p>相信大家對於資料分析領域中的<strong>「資料探勘」(data mining)</strong>應該比較不陌生，多數資料探勘是針對「數字」型態的資料進行分析，大家試圖從數據資料庫中找出有意義、有價值的資訊。</p><p>舉例來說：企業手上有一大堆的會員數據資料，可能包括消費金額、消費日期、年齡、消費品項等等，但難以從這一堆數字中迅速獲得任何有用的資訊來制定相關策略，畢竟資訊多又複雜，因此透過資料探勘我們可以試圖找出數據與數據間的關係</p><ul><li>可能發現多數消費A產品的顧客都流失了</li><li>也可能意外的發現某個星座的消費者總是購買最多的B產品</li></ul><p>找出數據間的規則也就找出了策略、決策的發展方向，比起以往更能「在對的時間提供對的東西給對的人」，讓消費者乖乖的把錢掏出來！</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gDAMCm2nHGA-HcJg7Uj5JQ.jpeg" /></figure><p>而<strong>「文字探勘」(text mining)</strong>是資料探勘的一種延伸，顧名思義就是針對「文字」型態的資料進行分析，舉凡報章雜誌、小說、新聞、演講稿、社群文章、消費者留言等等都是可以分析的對象，雖然我們用肉眼看不出來一篇演講稿、一堆消費者留言有什麼樣的重點，但透由文字探勘的動作我們一樣能挖掘出其中有價值的資訊。</p><ul><li>研發人員從一堆消費者留言中找出消費者討論的主題是甚麼，這有助於改善產品的開發流程</li><li>社群小編可以從成千上萬的社群文章中發現，文章中提及什麼樣的關鍵字眼可以達到最高的觸擊率</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/450/1*CrrQGhyFoSSG6CfYe7S1Jw.gif" /></figure><p>文字探勘目前多數的應用在產品服務/改進、品牌分析、產品排名/推薦、客戶偏好分析、市場結構分析、客戶體驗和滿意度分析等等。這系列主要的主題會從產品服務/改進切入和大家舉例做介紹，但不論是哪個方面的應用邏輯上都是大同小異，大家跟著舉一反三即可。</p><p>文字探勘的過程其實是一種<strong>「自然語言處理」(Natural Language Process)</strong>，大致上處理流程包括</p><ul><li>斷詞/斷句 Tokenizing words and Sentences</li><li>詞幹提取 Stemming</li><li>詞性還原 Lemmatization</li><li>詞性標註 Part of Speech Tagging</li><li>停用詞處理 Stop Words</li><li>命名實體識別 Named Entity Recognition</li><li>文字分類 Chunking</li><li>主題模型 Topic</li><li>情緒分析 Sentiment Analysis</li></ul><p>而在處理工具上面以Python來說，以下幾種是常見的英語自然語言處理工具(處理中文語言最常使用的是Jieba，但往後介紹皆以英文為主，就不贅述)</p><ul><li><a href="http://www.nltk.org/">Natural Language Tool Kit, NLTK</a> ：最常見的自然語言處理套件包</li><li><a href="https://stanfordnlp.github.io/CoreNLP/">Stanford Core NLP</a> ： Stanford（史丹佛大學）所開發的自然語言處理工具</li></ul><p>應用於文字探勘的工具其實有百百種，每個步驟中又有不同的工具和方法能進行選擇，而且每個方法都存在優缺點，所以通常在看大家的教學文章時會發現大家步驟前後順序可能有所不同、工具選用上也都不一樣，有人可能一個套件包用到底，有人中間可能會穿插一些不同套件包的工具，總之，可以視資料集的特性和自己的喜好進行工具的選擇，只要用的順手都沒問題的！</p><p>在詳細介紹每個步驟前先大致上和大家介紹何謂文字探勘、文字探勘的流程和工具。另外，由於我的研究資料集來自於歐美國家的線上購物平台，因此往後分享的工具皆以處理英文文章為主，有興趣的大家接著看下去呦！</p><blockquote>這一系列的文章主要是想記錄我如何學習文字探勘的過程並彙整我的自身想法和一些資源，希望用淺顯易懂的方式介紹給完全沒接觸過但想進入同樣領域的朋友們，我實際接觸的時間其實也大約只有半年，內容若有不足或錯誤還請大家多包含及指正，文章也會持續進行修正和補充~</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*KzRW1rw8pTBTPU4llLRyzg.gif" /></figure><p><a href="https://panyo973000.medium.com/%E5%BE%9E%E9%A0%AD%E9%96%8B%E5%A7%8B%E6%96%87%E5%AD%97%E6%8E%A2%E5%8B%98-%E6%96%B7%E8%A9%9E%E6%96%B7%E5%8F%A5-%E5%81%9C%E7%94%A8%E5%AD%97%E5%8E%BB%E9%99%A4-638fe6c3bcae">從頭開始文字探勘─斷詞斷句、停用字去除</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a01429c8c899" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>