mirror of
https://github.com/safishamsi/graphify.git
synced 2026-09-27 07:55:43 +00:00
feat: 13-language AST support and token benchmark
Java, C, C++, Ruby, C#, Kotlin, Scala, PHP via tree-sitter (13 total) benchmark.py measures BFS subgraph tokens vs corpus tokens 5 skill bug fixes (cohesion crash, dead step, missing MCP tool)
This commit is contained in:
Vendored
+32
@@ -0,0 +1,32 @@
|
||||
import java.util.List;
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class DataProcessor {
|
||||
private List<String> items;
|
||||
|
||||
public DataProcessor() {
|
||||
this.items = new ArrayList<>();
|
||||
}
|
||||
|
||||
public void addItem(String item) {
|
||||
items.add(item);
|
||||
}
|
||||
|
||||
public List<String> process() {
|
||||
return validate(items);
|
||||
}
|
||||
|
||||
private List<String> validate(List<String> data) {
|
||||
List<String> result = new ArrayList<>();
|
||||
for (String s : data) {
|
||||
if (s != null && !s.isEmpty()) {
|
||||
result.add(s.trim());
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
interface Processor {
|
||||
List<String> process();
|
||||
}
|
||||
Reference in New Issue
Block a user