Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions llm_web_kit/extractor/html/recognizer/ccmath.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,8 @@ def process_ccmath_html(self, cc_html: str, o_html: str, math_render: BaseMathRe
# case1:有mathjax配置
if math_render_type == MathRenderType.MATHJAX:
math_render.find_math(tree)
# case2:无Mathjax配置但是开启Mathjax逻辑开关(node循环抽到公式的情况)
elif math_render_type is None and self.mathjax_detected:
# case2:其他情况默认开启 Mathjax配置
else:
from llm_web_kit.extractor.html.recognizer.cc_math.render.mathjax import \
MathJaxRenderMock
math_render = MathJaxRenderMock()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -673,7 +673,7 @@ <h1 id="" itemprop="headline">If Cowboys want to lock up Tony Romo, they will ha

</div>
<div class="article-body">
<p>On why the Cowboys haven’t extended Tony #Romo yet#: “The problem with Tony Romo is this. His cap number is $16.8 million. The only way you can reduce that is by extending the contract, but here is the problem. Next year, if he becomes a franchise quarterback if they use the franchise tag, they will have to tender him a 1-year deal in the amount of $21.6 million. If you’re the agent for Tony Romo, you say ok we’ll do a long-term deal, but we have to use these numbers. $16.8 million this year, $20.16 million next year and then the following year it goes up another 20 percent to $24 or 25 million. You’re looking at at least $60 million over three years if they want to lock Tony Romo up. That’s the dance that’s going on between the Cowboys and Tony Romo. If Romo is willing to keep the risk of injury, if he’s willing to roll the dice and go through this year and see what happens, the Cowboys could be backed into a corner next year.” On why the Cowboys haven’t made moves in free agency: “The problem is you can’t do anything without creating cap space, and you’re not going to create cap space without cutting guys unless you extend Anthony Spencer’s deal. Now the problem is moving to the 4-3. His agent Jordan Woy is going to be saying you need to be paying him more like a 4-3 defensive not a 3-4 outside linebacker because a 4-3 defensive end makes more money.”</p><aside>
<p>On why the Cowboys haven’t extended Tony #Romo yet#: “The problem with Tony Romo is this. His cap number is $16.8 million. ”</p><aside>
<div class="aside relatedSidebar">
<div class="titlebar"><h1>Related</h1></div>
<div class="related keywordRelated">
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
\begin{vmatrix}\mathbf{i} & \mathbf{j} & \mathbf{k} \\\frac{\partial X}{\partial u} & \frac{\partial Y}{\partial u} & 0 \\\frac{\partial X}{\partial v} & \frac{\partial Y}{\partial v} & 0\end{vmatrix}
5 changes: 5 additions & 0 deletions tests/llm_web_kit/extractor/html/recognizer/test_math.py
Original file line number Diff line number Diff line change
Expand Up @@ -492,6 +492,11 @@ def test_math_recognizer_html(self):
parts = [part[0] for part in new_parts if CCTag.CC_MATH_INTERLINE in part[0]]
expect_text = base_dir.joinpath(test_case['expected']).read_text(encoding='utf-8').strip()
expect_formulas = [formula for formula in expect_text.split('\n') if formula]
if len(parts) != len(expect_formulas):
print("出错样例:", test_case['input'])
print("期望公式数:", len(expect_formulas), "实际公式数:", len(parts))
print("期望公式:", expect_formulas)
print("实际公式:", parts)
self.assertEqual(len(parts), len(expect_formulas))
# answers = []
for expect, part in zip(expect_formulas, parts):
Expand Down
Loading