This commit is contained in:
mingtian 2025-04-06 19:37:40 +08:00
parent 6d06d0786e
commit 2f6b146e1d
2 changed files with 124 additions and 69 deletions

View file

@ -3,3 +3,4 @@ pymupdf==1.25.5
PyPDF2==3.0.1 PyPDF2==3.0.1
python-dotenv==1.1.0 python-dotenv==1.1.0
tiktoken==0.7.0 tiktoken==0.7.0
pyyaml==6.0.2

View file

@ -2,80 +2,78 @@
"doc_name": "four-lectures.pdf", "doc_name": "four-lectures.pdf",
"structure": [ "structure": [
{ {
"title": "Four Lectures on Standard ML", "title": "Preface",
"start_index": 1, "start_index": 1,
"end_index": 1, "end_index": 1,
"node_id": "0000"
},
{
"title": "ML at a Glance",
"start_index": 2,
"end_index": 2,
"nodes": [ "nodes": [
{ {
"title": "ML at a Glance", "title": "An ML session",
"start_index": 2, "start_index": 2,
"end_index": 2, "end_index": 3,
"nodes": [ "node_id": "0002"
{ },
"title": "An ML session", {
"start_index": 2, "title": "Types and Values",
"end_index": 3, "start_index": 3,
"node_id": "0002" "end_index": 4,
}, "node_id": "0003"
{ },
"title": "Types and Values", {
"start_index": 3, "title": "Recursive Functions",
"end_index": 4, "start_index": 4,
"node_id": "0003" "end_index": 4,
}, "node_id": "0004"
{ },
"title": "Recursive Functions", {
"start_index": 4, "title": "Raising Exceptions",
"end_index": 4, "start_index": 4,
"node_id": "0004" "end_index": 5,
}, "node_id": "0005"
{ },
"title": "Raising Exceptions", {
"start_index": 4, "title": "Structures",
"end_index": 5, "start_index": 5,
"node_id": "0005" "end_index": 6,
}, "node_id": "0006"
{ },
"title": "Structures", {
"start_index": 5, "title": "Signatures",
"end_index": 6, "start_index": 6,
"node_id": "0006" "end_index": 7,
}, "node_id": "0007"
{ },
"title": "Signatures", {
"start_index": 6, "title": "Coercive Signature Matching",
"end_index": 7, "start_index": 7,
"node_id": "0007" "end_index": 8,
}, "node_id": "0008"
{ },
"title": "Coercive Signature Matching", {
"start_index": 7, "title": "Functor Declaration",
"end_index": 8, "start_index": 8,
"node_id": "0008" "end_index": 9,
}, "node_id": "0009"
{ },
"title": "Functor Declaration", {
"start_index": 8, "title": "Functor Application",
"end_index": 9, "start_index": 9,
"node_id": "0009" "end_index": 9,
}, "node_id": "0010"
{ },
"title": "Functor Application", {
"start_index": 9, "title": "Summary",
"end_index": 9, "start_index": 9,
"node_id": "0010" "end_index": 9,
}, "node_id": "0011"
{
"title": "Summary",
"start_index": 9,
"end_index": 9,
"node_id": "0011"
}
],
"node_id": "0001"
} }
], ],
"node_id": "0000" "node_id": "0001"
}, },
{ {
"title": "Programming with ML Modules", "title": "Programming with ML Modules",
@ -266,14 +264,70 @@
{ {
"title": "Appendix A: The Bare Interpreter", "title": "Appendix A: The Bare Interpreter",
"start_index": 44, "start_index": 44,
"end_index": 52, "end_index": 44,
"nodes": [
{
"title": "Syntax",
"start_index": 44,
"end_index": 44,
"node_id": "0043"
},
{
"title": "Parsing",
"start_index": 44,
"end_index": 45,
"node_id": "0044"
},
{
"title": "Environments",
"start_index": 45,
"end_index": 45,
"node_id": "0045"
},
{
"title": "Evaluation",
"start_index": 45,
"end_index": 46,
"node_id": "0046"
},
{
"title": "Type Checking",
"start_index": 46,
"end_index": 46,
"node_id": "0047"
},
{
"title": "The Interpreter",
"start_index": 46,
"end_index": 47,
"node_id": "0048"
},
{
"title": "The Evaluator",
"start_index": 47,
"end_index": 48,
"node_id": "0049"
},
{
"title": "The Typechecker",
"start_index": 48,
"end_index": 49,
"node_id": "0050"
},
{
"title": "The Basics",
"start_index": 50,
"end_index": 52,
"node_id": "0051"
}
],
"node_id": "0042" "node_id": "0042"
}, },
{ {
"title": "Appendix B: Files", "title": "Appendix B: Files",
"start_index": 53, "start_index": 53,
"end_index": 53, "end_index": 53,
"node_id": "0043" "node_id": "0052"
} }
] ]
} }