dstpr 0.2.1__tar.gz → 0.2.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dstpr
3
- Version: 0.2.1
3
+ Version: 0.2.2
4
4
  Summary: A high-throughput, domain-specific text preprocessing cascading pipeline filter to rank core sentences in texts and filter away boilerplate.
5
5
  Author-email: Stephen Meisenbacher <sjmeis@gtgd.com>
6
6
  Maintainer-email: Stephen Meisenbacher <sjmeis@gtgd.com>
@@ -94,8 +94,8 @@ If you want to integrate specific pipeline layers directly into an existing work
94
94
  ```python
95
95
  from dstpr.cleaners import clean_and_split_chunks
96
96
  from dstpr.segmenters import SemanticSectionRouter
97
- from dstpr.rankers import HybridTaskRanker
98
- from sentence_transformers import Transformer, SentenceTransformer
97
+ from dstpr.rankers import HybridRanker
98
+ from sentence_transformers import SentenceTransformer
99
99
 
100
100
  embedding_model = SentenceTransformer("all-MiniLM-L6-v2")
101
101
 
@@ -110,7 +110,7 @@ buckets = router.route_sentences(sentences)
110
110
  target_sentences = buckets['CORE'] + buckets['REQUIREMENTS']
111
111
 
112
112
  # Grade and sort text features
113
- ranker = HybridRanker(model=shared_model)
113
+ ranker = HybridRanker()
114
114
  final = ranker.rank_and_filter(target_sentences, bi_cutoff_pct=0.25, final_threshold=0.40)
115
115
  ```
116
116
 
@@ -54,8 +54,8 @@ If you want to integrate specific pipeline layers directly into an existing work
54
54
  ```python
55
55
  from dstpr.cleaners import clean_and_split_chunks
56
56
  from dstpr.segmenters import SemanticSectionRouter
57
- from dstpr.rankers import HybridTaskRanker
58
- from sentence_transformers import Transformer, SentenceTransformer
57
+ from dstpr.rankers import HybridRanker
58
+ from sentence_transformers import SentenceTransformer
59
59
 
60
60
  embedding_model = SentenceTransformer("all-MiniLM-L6-v2")
61
61
 
@@ -70,7 +70,7 @@ buckets = router.route_sentences(sentences)
70
70
  target_sentences = buckets['CORE'] + buckets['REQUIREMENTS']
71
71
 
72
72
  # Grade and sort text features
73
- ranker = HybridRanker(model=shared_model)
73
+ ranker = HybridRanker()
74
74
  final = ranker.rank_and_filter(target_sentences, bi_cutoff_pct=0.25, final_threshold=0.40)
75
75
  ```
76
76
 
@@ -47,13 +47,13 @@ class ParallelPreprocessingPipeline:
47
47
  print(f"GPU Auto-Calibrated Batch Size: {self.inference_batch_size}")
48
48
 
49
49
  dtype = torch.bfloat16 if torch.cuda.is_bf16_supported() else torch.float16
50
- bi_encoder = SentenceTransformer(
50
+ self.bi_encoder = SentenceTransformer(
51
51
  self.embedding_model,
52
52
  device="cuda",
53
53
  model_kwargs={"dtype": dtype}
54
54
  )
55
55
 
56
- cross_encoder = CrossEncoder(
56
+ self.cross_encoder = CrossEncoder(
57
57
  "cross-encoder/ms-marco-MiniLM-L6-v2",
58
58
  device="cuda",
59
59
  model_kwargs={"dtype": dtype}
@@ -63,11 +63,11 @@ class ParallelPreprocessingPipeline:
63
63
  self.bi_encoder = SentenceTransformer(self.embedding_model, device=device)
64
64
  self.cross_encoder = CrossEncoder("cross-encoder/ms-marco-MiniLM-L-6-v2", device=device)
65
65
 
66
- self.router = SemanticSectionRouter(profile=self.profile, model=bi_encoder)
66
+ self.router = SemanticSectionRouter(profile=self.profile, model=self.bi_encoder)
67
67
  self.ranker = HybridRanker(
68
68
  profile=self.profile,
69
- model=bi_encoder,
70
- cross_encoder_model=cross_encoder,
69
+ model=self.bi_encoder,
70
+ cross_encoder_model=self.cross_encoder,
71
71
  )
72
72
  self._is_initialized = True
73
73
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dstpr
3
- Version: 0.2.1
3
+ Version: 0.2.2
4
4
  Summary: A high-throughput, domain-specific text preprocessing cascading pipeline filter to rank core sentences in texts and filter away boilerplate.
5
5
  Author-email: Stephen Meisenbacher <sjmeis@gtgd.com>
6
6
  Maintainer-email: Stephen Meisenbacher <sjmeis@gtgd.com>
@@ -94,8 +94,8 @@ If you want to integrate specific pipeline layers directly into an existing work
94
94
  ```python
95
95
  from dstpr.cleaners import clean_and_split_chunks
96
96
  from dstpr.segmenters import SemanticSectionRouter
97
- from dstpr.rankers import HybridTaskRanker
98
- from sentence_transformers import Transformer, SentenceTransformer
97
+ from dstpr.rankers import HybridRanker
98
+ from sentence_transformers import SentenceTransformer
99
99
 
100
100
  embedding_model = SentenceTransformer("all-MiniLM-L6-v2")
101
101
 
@@ -110,7 +110,7 @@ buckets = router.route_sentences(sentences)
110
110
  target_sentences = buckets['CORE'] + buckets['REQUIREMENTS']
111
111
 
112
112
  # Grade and sort text features
113
- ranker = HybridRanker(model=shared_model)
113
+ ranker = HybridRanker()
114
114
  final = ranker.rank_and_filter(target_sentences, bi_cutoff_pct=0.25, final_threshold=0.40)
115
115
  ```
116
116
 
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "dstpr"
7
- version = "0.2.1"
7
+ version = "0.2.2"
8
8
  description = "A high-throughput, domain-specific text preprocessing cascading pipeline filter to rank core sentences in texts and filter away boilerplate."
9
9
  readme = {file = "README.md", content-type = "text/markdown"}
10
10
  license = {file = "LICENSE"}
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes