File tree Expand file tree Collapse file tree 13 files changed +26
-149
lines changed Expand file tree Collapse file tree 13 files changed +26
-149
lines changed Original file line number Diff line number Diff line change 1
- #
2
- # Copyright 2024 The InfiniFlow Authors. All Rights Reserved.
3
- #
4
- # Licensed under the Apache License, Version 2.0 (the "License");
5
- # you may not use this file except in compliance with the License.
6
- # You may obtain a copy of the License at
7
- #
8
- # http://www.apache.org/licenses/LICENSE-2.0
9
- #
10
- # Unless required by applicable law or agreed to in writing, software
11
- # distributed under the License is distributed on an "AS IS" BASIS,
12
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- # See the License for the specific language governing permissions and
14
- # limitations under the License.
15
- #
1
+ # Copyright (c) 2024 Microsoft Corporation.
2
+ # Licensed under the MIT License
16
3
"""
17
4
Reference:
18
5
- [graphrag](https://github.com/microsoft/graphrag)
19
6
"""
7
+
20
8
import argparse
21
9
import json
22
10
import logging
Original file line number Diff line number Diff line change 1
- #
2
- # Copyright 2024 The InfiniFlow Authors. All Rights Reserved.
3
- #
4
- # Licensed under the Apache License, Version 2.0 (the "License");
5
- # you may not use this file except in compliance with the License.
6
- # You may obtain a copy of the License at
7
- #
8
- # http://www.apache.org/licenses/LICENSE-2.0
9
- #
10
- # Unless required by applicable law or agreed to in writing, software
11
- # distributed under the License is distributed on an "AS IS" BASIS,
12
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- # See the License for the specific language governing permissions and
14
- # limitations under the License.
15
- #
1
+ # Copyright (c) 2024 Microsoft Corporation.
2
+ # Licensed under the MIT License
16
3
"""
17
4
Reference:
18
5
- [graphrag](https://github.com/microsoft/graphrag)
Original file line number Diff line number Diff line change 1
- #
2
- # Copyright 2024 The InfiniFlow Authors. All Rights Reserved.
3
- #
4
- # Licensed under the Apache License, Version 2.0 (the "License");
5
- # you may not use this file except in compliance with the License.
6
- # You may obtain a copy of the License at
7
- #
8
- # http://www.apache.org/licenses/LICENSE-2.0
9
- #
10
- # Unless required by applicable law or agreed to in writing, software
11
- # distributed under the License is distributed on an "AS IS" BASIS,
12
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- # See the License for the specific language governing permissions and
14
- # limitations under the License.
15
- #
1
+ # Copyright (c) 2024 Microsoft Corporation.
2
+ # Licensed under the MIT License
16
3
"""
17
4
Reference:
18
5
- [graphrag](https://github.com/microsoft/graphrag)
Original file line number Diff line number Diff line change 1
- #
2
- # Copyright 2024 The InfiniFlow Authors. All Rights Reserved.
3
- #
4
- # Licensed under the Apache License, Version 2.0 (the "License");
5
- # you may not use this file except in compliance with the License.
6
- # You may obtain a copy of the License at
7
- #
8
- # http://www.apache.org/licenses/LICENSE-2.0
9
- #
10
- # Unless required by applicable law or agreed to in writing, software
11
- # distributed under the License is distributed on an "AS IS" BASIS,
12
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- # See the License for the specific language governing permissions and
14
- # limitations under the License.
15
- #
1
+ # Copyright (c) 2024 Microsoft Corporation.
2
+ # Licensed under the MIT License
16
3
"""
17
4
Reference:
18
5
- [graphrag](https://github.com/microsoft/graphrag)
Original file line number Diff line number Diff line change 1
- #
2
- # Copyright 2024 The InfiniFlow Authors. All Rights Reserved.
3
- #
4
- # Licensed under the Apache License, Version 2.0 (the "License");
5
- # you may not use this file except in compliance with the License.
6
- # You may obtain a copy of the License at
7
- #
8
- # http://www.apache.org/licenses/LICENSE-2.0
9
- #
10
- # Unless required by applicable law or agreed to in writing, software
11
- # distributed under the License is distributed on an "AS IS" BASIS,
12
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- # See the License for the specific language governing permissions and
14
- # limitations under the License.
15
- #
1
+ # Copyright (c) 2024 Microsoft Corporation.
2
+ # Licensed under the MIT License
16
3
"""
17
4
Reference:
18
5
- [graphrag](https://github.com/microsoft/graphrag)
Original file line number Diff line number Diff line change 1
- #
2
- # Copyright 2024 The InfiniFlow Authors. All Rights Reserved.
3
- #
4
- # Licensed under the Apache License, Version 2.0 (the "License");
5
- # you may not use this file except in compliance with the License.
6
- # You may obtain a copy of the License at
7
- #
8
- # http://www.apache.org/licenses/LICENSE-2.0
9
- #
10
- # Unless required by applicable law or agreed to in writing, software
11
- # distributed under the License is distributed on an "AS IS" BASIS,
12
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- # See the License for the specific language governing permissions and
14
- # limitations under the License.
15
- #
1
+ # Copyright (c) 2024 Microsoft Corporation.
2
+ # Licensed under the MIT License
16
3
"""
17
4
Reference:
18
5
- [graphrag](https://github.com/microsoft/graphrag)
Original file line number Diff line number Diff line change 13
13
# See the License for the specific language governing permissions and
14
14
# limitations under the License.
15
15
#
16
+
16
17
import logging
17
18
import re
18
19
import traceback
Original file line number Diff line number Diff line change 1
- #
2
- # Copyright 2024 The InfiniFlow Authors. All Rights Reserved.
3
- #
4
- # Licensed under the Apache License, Version 2.0 (the "License");
5
- # you may not use this file except in compliance with the License.
6
- # You may obtain a copy of the License at
7
- #
8
- # http://www.apache.org/licenses/LICENSE-2.0
9
- #
10
- # Unless required by applicable law or agreed to in writing, software
11
- # distributed under the License is distributed on an "AS IS" BASIS,
12
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- # See the License for the specific language governing permissions and
14
- # limitations under the License.
1
+ # Copyright (c) 2024 Microsoft Corporation.
2
+ # Licensed under the MIT License
15
3
"""
16
4
Reference:
17
5
- [graphrag](https://github.com/microsoft/graphrag)
18
6
"""
7
+
19
8
import logging
20
9
import numbers
21
10
import re
Original file line number Diff line number Diff line change 1
- #
2
- # Copyright 2024 The InfiniFlow Authors. All Rights Reserved.
3
- #
4
- # Licensed under the Apache License, Version 2.0 (the "License");
5
- # you may not use this file except in compliance with the License.
6
- # You may obtain a copy of the License at
7
- #
8
- # http://www.apache.org/licenses/LICENSE-2.0
9
- #
10
- # Unless required by applicable law or agreed to in writing, software
11
- # distributed under the License is distributed on an "AS IS" BASIS,
12
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- # See the License for the specific language governing permissions and
14
- # limitations under the License.
15
- #
1
+ # Copyright (c) 2024 Microsoft Corporation.
2
+ # Licensed under the MIT License
16
3
"""
17
4
Reference:
18
5
- [graphrag](https://github.com/microsoft/graphrag)
19
6
"""
7
+
20
8
GRAPH_EXTRACTION_PROMPT = """
21
9
-Goal-
22
10
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.
Original file line number Diff line number Diff line change 1
- #
2
- # Copyright 2024 The InfiniFlow Authors. All Rights Reserved.
3
- #
4
- # Licensed under the Apache License, Version 2.0 (the "License");
5
- # you may not use this file except in compliance with the License.
6
- # You may obtain a copy of the License at
7
- #
8
- # http://www.apache.org/licenses/LICENSE-2.0
9
- #
10
- # Unless required by applicable law or agreed to in writing, software
11
- # distributed under the License is distributed on an "AS IS" BASIS,
12
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- # See the License for the specific language governing permissions and
14
- # limitations under the License.
15
- #
1
+ # Copyright (c) 2024 Microsoft Corporation.
2
+ # Licensed under the MIT License
16
3
"""
17
4
Reference:
18
5
- [graphrag](https://github.com/microsoft/graphrag)
You can’t perform that action at this time.
0 commit comments