File tree Expand file tree Collapse file tree 6 files changed +55
-2
lines changed
Expand file tree Collapse file tree 6 files changed +55
-2
lines changed Original file line number Diff line number Diff line change 11# Changelog
22
3+ ## v2.1.0
4+
5+ ### Added
6+
7+ * Add support of image type.
8+
39## v2.0.0
410
511* Add parsing of table structure.
Original file line number Diff line number Diff line change @@ -61,6 +61,7 @@ class ContentCategory(Enum):
6161 LINE_PLOT = "LINE_PLOT"
6262 PIE_CHART = "PIE_CHART"
6363 SCATTER_PLOT = "SCATTER_PLOT"
64+ IMAGE = "IMAGE"
6465
6566
6667ELEMENT_TITLE_CONTENT_CATEGORIES = {
Load Diff Large diffs are not rendered by default.
Original file line number Diff line number Diff line change @@ -123,6 +123,7 @@ def test_convert_output_to_items(self) -> None:
123123 "to as predictive analytics." ,
124124 },
125125 {"category" : "figure" , "text" : "" },
126+ {"category" : "image" , "text" : "" },
126127 {"category" : "title" , "text" : "Recommendation: BUY" },
127128 {"category" : "text" , "text" : "42" },
128129 {"category" : "text" , "text" : "test noise string at bottom" },
@@ -272,6 +273,19 @@ def test_convert_output_to_items(self) -> None:
272273 )
273274 ],
274275 },
276+ {
277+ "category" : "image" ,
278+ "text" : "" ,
279+ "locations" : [
280+ LocationModel (
281+ height = 0.02 ,
282+ width = 0.15 ,
283+ x = 0.5 ,
284+ y = 0.87 ,
285+ page_number = 0 ,
286+ )
287+ ],
288+ },
275289 {
276290 "category" : "title" ,
277291 "text" : "Recommendation: BUY" ,
Original file line number Diff line number Diff line change @@ -100,6 +100,7 @@ def test_extract_organized_sections(self) -> None:
100100 ),
101101 },
102102 {"category" : "figure" , "text" : "" },
103+ {"category" : "image" , "text" : "" },
103104 ],
104105 [
105106 {"category" : "title" , "text" : "Recommendation: BUY" },
@@ -975,6 +976,21 @@ def test_extract_organized_sections(self) -> None:
975976 "type" : "FIGURE" ,
976977 "uid" : "33" ,
977978 },
979+ {
980+ "children" : [],
981+ "content" : "" ,
982+ "locations" : [
983+ {
984+ "height" : 0.02 ,
985+ "page_number" : 0 ,
986+ "width" : 0.15 ,
987+ "x" : 0.5 ,
988+ "y" : 0.87 ,
989+ }
990+ ],
991+ "type" : "IMAGE" ,
992+ "uid" : "38" ,
993+ },
978994 {
979995 "children" : [],
980996 "content" : "Recommendation: BUY" ,
@@ -1909,6 +1925,21 @@ def test_extract_organized_sections(self) -> None:
19091925 "type" : "FIGURE" ,
19101926 "uid" : "33" ,
19111927 },
1928+ {
1929+ "children" : [],
1930+ "content" : "" ,
1931+ "locations" : [
1932+ {
1933+ "height" : 0.02 ,
1934+ "page_number" : 0 ,
1935+ "width" : 0.15 ,
1936+ "x" : 0.5 ,
1937+ "y" : 0.87 ,
1938+ }
1939+ ],
1940+ "type" : "IMAGE" ,
1941+ "uid" : "38" ,
1942+ },
19121943 {
19131944 "children" : [],
19141945 "content" : "Recommendation: BUY" ,
@@ -2007,6 +2038,7 @@ def test_extract_organized_sections(self) -> None:
20072038 ),
20082039 },
20092040 {"category" : "figure" , "text" : "" },
2041+ {"category" : "image" , "text" : "" },
20102042 ],
20112043 [{"category" : "title" , "text" : "Recommendation: BUY" }],
20122044 ]
Original file line number Diff line number Diff line change 11[tool .poetry ]
22name = " kensho_kenverters"
3- version = " 2.0 .0"
3+ version = " 2.1 .0"
44description = " Extract Output Translator Tools"
55readme = " README.md"
66authors = [" Valerie Faucon-Morin <valerie.fauconmorin@kensho.com>" ]
You can’t perform that action at this time.
0 commit comments