diff --git a/graphrag/claim_extractor.py b/graphrag/claim_extractor.py index ee9e7f323..942bafa3f 100644 --- a/graphrag/claim_extractor.py +++ b/graphrag/claim_extractor.py @@ -1,22 +1,10 @@ -# -# Copyright 2024 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. -# +# Copyright (c) 2024 Microsoft Corporation. +# Licensed under the MIT License """ Reference: - [graphrag](https://github.com/microsoft/graphrag) """ + import argparse import json import logging diff --git a/graphrag/claim_prompt.py b/graphrag/claim_prompt.py index 5678ffd13..b65971bbe 100644 --- a/graphrag/claim_prompt.py +++ b/graphrag/claim_prompt.py @@ -1,18 +1,5 @@ -# -# Copyright 2024 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. -# +# Copyright (c) 2024 Microsoft Corporation. +# Licensed under the MIT License """ Reference: - [graphrag](https://github.com/microsoft/graphrag) diff --git a/graphrag/community_report_prompt.py b/graphrag/community_report_prompt.py index 3b042d08b..554ea367c 100644 --- a/graphrag/community_report_prompt.py +++ b/graphrag/community_report_prompt.py @@ -1,18 +1,5 @@ -# -# Copyright 2024 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. -# +# Copyright (c) 2024 Microsoft Corporation. +# Licensed under the MIT License """ Reference: - [graphrag](https://github.com/microsoft/graphrag) diff --git a/graphrag/community_reports_extractor.py b/graphrag/community_reports_extractor.py index eb2c213c7..27b805ff4 100644 --- a/graphrag/community_reports_extractor.py +++ b/graphrag/community_reports_extractor.py @@ -1,18 +1,5 @@ -# -# Copyright 2024 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. -# +# Copyright (c) 2024 Microsoft Corporation. +# Licensed under the MIT License """ Reference: - [graphrag](https://github.com/microsoft/graphrag) diff --git a/graphrag/description_summary.py b/graphrag/description_summary.py index b49ecb022..3aa3287e7 100644 --- a/graphrag/description_summary.py +++ b/graphrag/description_summary.py @@ -1,18 +1,5 @@ -# -# Copyright 2024 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. -# +# Copyright (c) 2024 Microsoft Corporation. +# Licensed under the MIT License """ Reference: - [graphrag](https://github.com/microsoft/graphrag) diff --git a/graphrag/entity_embedding.py b/graphrag/entity_embedding.py index 7e247a8d1..ca9932b65 100644 --- a/graphrag/entity_embedding.py +++ b/graphrag/entity_embedding.py @@ -1,18 +1,5 @@ -# -# Copyright 2024 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. -# +# Copyright (c) 2024 Microsoft Corporation. +# Licensed under the MIT License """ Reference: - [graphrag](https://github.com/microsoft/graphrag) diff --git a/graphrag/entity_resolution.py b/graphrag/entity_resolution.py index 909207682..92152aa9a 100644 --- a/graphrag/entity_resolution.py +++ b/graphrag/entity_resolution.py @@ -13,6 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. # + import logging import re import traceback diff --git a/graphrag/graph_extractor.py b/graphrag/graph_extractor.py index 00d0f72ad..c2dc530ee 100644 --- a/graphrag/graph_extractor.py +++ b/graphrag/graph_extractor.py @@ -1,21 +1,10 @@ -# -# Copyright 2024 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. +# Copyright (c) 2024 Microsoft Corporation. +# Licensed under the MIT License """ Reference: - [graphrag](https://github.com/microsoft/graphrag) """ + import logging import numbers import re diff --git a/graphrag/graph_prompt.py b/graphrag/graph_prompt.py index 11f3a6aee..53ce61ad8 100644 --- a/graphrag/graph_prompt.py +++ b/graphrag/graph_prompt.py @@ -1,22 +1,10 @@ -# -# Copyright 2024 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. -# +# Copyright (c) 2024 Microsoft Corporation. +# Licensed under the MIT License """ Reference: - [graphrag](https://github.com/microsoft/graphrag) """ + GRAPH_EXTRACTION_PROMPT = """ -Goal- Given a text document that is potentially relevant to this activity and a list of entity types, identify all entities of those types from the text and all relationships among the identified entities. diff --git a/graphrag/leiden.py b/graphrag/leiden.py index 4fa1720ab..817970618 100644 --- a/graphrag/leiden.py +++ b/graphrag/leiden.py @@ -1,18 +1,5 @@ -# -# Copyright 2024 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. -# +# Copyright (c) 2024 Microsoft Corporation. +# Licensed under the MIT License """ Reference: - [graphrag](https://github.com/microsoft/graphrag) diff --git a/graphrag/mind_map_extractor.py b/graphrag/mind_map_extractor.py index 652c871d6..2968e9e36 100644 --- a/graphrag/mind_map_extractor.py +++ b/graphrag/mind_map_extractor.py @@ -13,6 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. # + import collections import logging import re diff --git a/graphrag/mind_map_prompt.py b/graphrag/mind_map_prompt.py index 4613c12dd..37f324cfa 100644 --- a/graphrag/mind_map_prompt.py +++ b/graphrag/mind_map_prompt.py @@ -13,6 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. # + MIND_MAP_EXTRACTION_PROMPT = """ - Role: You're a talent text processor to summarize a piece of text into a mind map. diff --git a/graphrag/utils.py b/graphrag/utils.py index a4524362c..ec7be23df 100644 --- a/graphrag/utils.py +++ b/graphrag/utils.py @@ -1,18 +1,5 @@ -# -# Copyright 2024 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. -# +# Copyright (c) 2024 Microsoft Corporation. +# Licensed under the MIT License """ Reference: - [graphrag](https://github.com/microsoft/graphrag)