Skip to content

Commit

Permalink
Update comments (#4569)
Browse files Browse the repository at this point in the history
### What problem does this PR solve?

Add license statement.

### Type of change

- [x] Refactoring

Signed-off-by: Jin Hai <[email protected]>
  • Loading branch information
JinHai-CN authored Jan 21, 2025
1 parent 583050a commit 3894de8
Show file tree
Hide file tree
Showing 86 changed files with 1,034 additions and 145 deletions.
16 changes: 16 additions & 0 deletions agent/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,18 @@
#
# Copyright 2025 The InfiniFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

from beartype.claw import beartype_this_package
beartype_this_package()
16 changes: 16 additions & 0 deletions agent/component/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
#
# Copyright 2025 The InfiniFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

import importlib
from .begin import Begin, BeginParam
from .generate import Generate, GenerateParam
Expand Down
2 changes: 1 addition & 1 deletion agent/settings.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright 2019 The FATE Authors. All Rights Reserved.
# Copyright 2025 The InfiniFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
16 changes: 16 additions & 0 deletions api/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,18 @@
#
# Copyright 2025 The InfiniFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

from beartype.claw import beartype_this_package
beartype_this_package()
16 changes: 16 additions & 0 deletions api/utils/t_crypt.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
#
# Copyright 2025 The InfiniFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

import base64
import os
import sys
Expand Down
16 changes: 16 additions & 0 deletions api/utils/web_utils.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
#
# Copyright 2025 The InfiniFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

import re
import socket
from urllib.parse import urlparse
Expand Down
16 changes: 16 additions & 0 deletions deepdoc/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,18 @@
#
# Copyright 2025 The InfiniFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

from beartype.claw import beartype_this_package
beartype_this_package()
3 changes: 3 additions & 0 deletions deepdoc/parser/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#
# Copyright 2025 The InfiniFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
Expand Down
3 changes: 3 additions & 0 deletions deepdoc/parser/docx_parser.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#
# Copyright 2025 The InfiniFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
Expand Down
3 changes: 3 additions & 0 deletions deepdoc/parser/excel_parser.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#
# Copyright 2025 The InfiniFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
Expand Down
4 changes: 4 additions & 0 deletions deepdoc/parser/html_parser.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# -*- coding: utf-8 -*-
#
# Copyright 2025 The InfiniFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
Expand All @@ -11,6 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#

from rag.nlp import find_codec
import readability
import html_text
Expand Down
16 changes: 16 additions & 0 deletions deepdoc/parser/json_parser.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,20 @@
# -*- coding: utf-8 -*-
#
# Copyright 2025 The InfiniFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

# The following documents are mainly referenced, and only adaptation modifications have been made
# from https://github.com/langchain-ai/langchain/blob/master/libs/text-splitters/langchain_text_splitters/json.py

Expand Down
4 changes: 4 additions & 0 deletions deepdoc/parser/markdown_parser.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# -*- coding: utf-8 -*-
#
# Copyright 2025 The InfiniFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
Expand All @@ -11,6 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#

import re

class RAGFlowMarkdownParser:
Expand Down
3 changes: 3 additions & 0 deletions deepdoc/parser/pdf_parser.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#
# Copyright 2025 The InfiniFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
Expand Down
4 changes: 4 additions & 0 deletions deepdoc/parser/ppt_parser.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#
# Copyright 2025 The InfiniFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
Expand All @@ -10,6 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#

import logging
from io import BytesIO
from pptx import Presentation
Expand Down
3 changes: 3 additions & 0 deletions deepdoc/parser/resume/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#
# Copyright 2025 The InfiniFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
Expand Down
15 changes: 15 additions & 0 deletions deepdoc/parser/resume/entities/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#
# Copyright 2025 The InfiniFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
3 changes: 3 additions & 0 deletions deepdoc/parser/resume/entities/corporations.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#
# Copyright 2025 The InfiniFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
Expand Down
3 changes: 3 additions & 0 deletions deepdoc/parser/resume/entities/degrees.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#
# Copyright 2025 The InfiniFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
Expand Down
3 changes: 3 additions & 0 deletions deepdoc/parser/resume/entities/industries.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#
# Copyright 2025 The InfiniFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
Expand Down
4 changes: 4 additions & 0 deletions deepdoc/parser/resume/entities/regions.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#
# Copyright 2025 The InfiniFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
Expand All @@ -10,6 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#

import re

TBL = {
Expand Down
3 changes: 3 additions & 0 deletions deepdoc/parser/resume/entities/schools.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#
# Copyright 2025 The InfiniFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
Expand Down
3 changes: 3 additions & 0 deletions deepdoc/parser/resume/step_one.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#
# Copyright 2025 The InfiniFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
Expand Down
4 changes: 4 additions & 0 deletions deepdoc/parser/resume/step_two.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#
# Copyright 2025 The InfiniFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
Expand All @@ -10,6 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#

import logging
import re
import copy
Expand Down
4 changes: 4 additions & 0 deletions deepdoc/parser/txt_parser.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#
# Copyright 2025 The InfiniFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
Expand All @@ -10,6 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#

import re

from deepdoc.parser.utils import get_text
Expand Down
3 changes: 3 additions & 0 deletions deepdoc/parser/utils.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#
# Copyright 2025 The InfiniFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
Expand Down
3 changes: 3 additions & 0 deletions deepdoc/vision/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#
# Copyright 2025 The InfiniFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
Expand Down
4 changes: 4 additions & 0 deletions deepdoc/vision/layout_recognizer.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#
# Copyright 2025 The InfiniFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
Expand All @@ -10,6 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#

import os
import re
from collections import Counter
Expand Down
3 changes: 3 additions & 0 deletions deepdoc/vision/ocr.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#
# Copyright 2025 The InfiniFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
Expand Down
3 changes: 3 additions & 0 deletions deepdoc/vision/postprocess.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#
# Copyright 2025 The InfiniFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
Expand Down
3 changes: 3 additions & 0 deletions deepdoc/vision/recognizer.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#
# Copyright 2025 The InfiniFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
Expand Down
3 changes: 3 additions & 0 deletions deepdoc/vision/seeit.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#
# Copyright 2025 The InfiniFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
Expand Down
3 changes: 3 additions & 0 deletions deepdoc/vision/t_ocr.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#
# Copyright 2025 The InfiniFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
Expand Down
Loading

0 comments on commit 3894de8

Please sign in to comment.