如何对出现轻微变化的单词进行分组和计数,例如以下示例?
<style type="text/css">
table.tableizer-table {
font-size: 12px;
border: 1px solid #CCC;
font-family: Arial, Helvetica, sans-serif;
}
.tableizer-table td {
padding: 4px;
margin: 3px;
border: 1px solid #CCC;
}
.tableizer-table th {
background-color: #104E8B;
color: #FFF;
font-weight: bold;
}
</style>
<table class="tableizer-table">
<thead><tr class="tableizer-firstrow"><th>subject</th></tr></thead><tbody>
<tr><td>account</td></tr>
<tr><td>accounts</td></tr>
<tr><td>account.</td></tr>
<tr><td>account,</td></tr>
<tr><td>account?</td></tr>
</tbody></table>
期望的结果是这样
<style type="text/css">
table.tableizer-table {
font-size: 12px;
border: 1px solid #CCC;
font-family: Arial, Helvetica, sans-serif;
}
.tableizer-table td {
padding: 4px;
margin: 3px;
border: 1px solid #CCC;
}
.tableizer-table th {
background-color: #104E8B;
color: #FFF;
font-weight: bold;
}
</style>
<table class="tableizer-table">
<thead><tr class="tableizer-firstrow"><th>subject</th><th>word_count</th></tr></thead><tbody>
<tr><td>account</td><td>5</td></tr>
</tbody></table>
主题列有数千个单词,因此我们无法使用LIKE手动将每个单词分组。谢谢。