{"id":16119468,"url":"https://github.com/downgoon/adindex4j","last_synced_at":"2025-09-12T12:38:45.478Z","repository":{"id":57718897,"uuid":"123409281","full_name":"downgoon/adindex4j","owner":"downgoon","description":"a java implementation of ad retrival algorithm proposed in Indexing Boolean Expressions-Ⅱ.pdf","archived":false,"fork":false,"pushed_at":"2018-03-27T15:47:21.000Z","size":39,"stargazers_count":11,"open_issues_count":1,"forks_count":2,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-02-28T09:11:32.883Z","etag":null,"topics":["adserver","bool-expression"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/downgoon.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-03-01T09:01:18.000Z","updated_at":"2023-03-16T11:44:32.000Z","dependencies_parsed_at":"2022-08-27T16:23:41.589Z","dependency_job_id":null,"html_url":"https://github.com/downgoon/adindex4j","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/downgoon%2Fadindex4j","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/downgoon%2Fadindex4j/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/downgoon%2Fadindex4j/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/downgoon%2Fadindex4j/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/downgoon","download_url":"https://codeload.github.com/downgoon/adindex4j/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243922059,"owners_count":20369339,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["adserver","bool-expression"],"created_at":"2024-10-09T20:54:13.402Z","updated_at":"2025-03-18T10:31:33.844Z","avatar_url":"https://github.com/downgoon.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# adindex4j\n\na java implementation of ad retrival algorithm proposed in [Indexing Boolean Expressions-Ⅱ.pdf](http://opbs7gfa4.bkt.clouddn.com/paper/Indexing%20Boolean%20Expressions-%E2%85%A1.pdf)\n\n\n## QuickStart\n\n- **Requirement**: ``Java8``\n\n- **Maven Dependency**\n\n``` xml\n\u003cdependency\u003e\n  \u003cgroupId\u003ecom.downgoon\u003c/groupId\u003e\n  \u003cartifactId\u003eadindex4j\u003c/artifactId\u003e\n  \u003cversion\u003e${version}\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\nthe lastest release version can be found here [g:\"com.downgoon\" a:\"adindex4j\"](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.downgoon%22%20a%3A%22adindex4j%22)\n\n- **Sample Code**\n\n``` java\n// 5 ad documents targeting several attributes\nAdRetrival adRetrival = new BEScaner();\n\n// notation form targeting: 1, \"location=北京^gender=男\"\nadRetrival.appendDocument(1, \"location=北京^gender=男\");\n\n// java-object form targeting: 2, \"location=上海^gender=女\"\nadRetrival.appendDocument(new Document(2,\n    new DNF( //\n        new Conjunction( //\n            new Assignment(\"location\", Predicate.INCLUSIVE, \"上海\"), //\n            new Assignment(\"gender\", Predicate.INCLUSIVE, \"女\") //\n        ) //\n    )));\n\n// a DNF with multiple conjunctions\nadRetrival.appendDocument(3, \"(location=北京|上海^gender=男) | (location=深圳^gender=女)\");\nadRetrival.appendDocument(4, \"location!=北京|上海\");\n\n// query\nString query = \"location=北京^gender=男\";\n\n// results: [1, 3]\nSet\u003cLong\u003e docIds = adRetrival.retrieveDocuments(query);\nLOG.info(\"query: {}, results: {}\", query, docIds);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdowngoon%2Fadindex4j","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdowngoon%2Fadindex4j","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdowngoon%2Fadindex4j/lists"}