Coder Social home page Coder Social logo

algoprog / faspect Goto Github PK

View Code? Open in Web Editor NEW
14.0 4.0 1.0 277 KB

A library for open domain query facet extraction and generation

License: MIT License

Python 100.00%
facet-extraction facet-generation faceted-search nlp seq2seq sequence-to-sequence sequence-tagging text-generation language-models

faspect's Introduction

Faspect

Open In Colab

Faspect is a library with various model implementations for open domain query facet extraction and generation. For more details you can have a look at our ICTIR 2022 paper: Revisiting Open Domain Query Facet Extraction and Generation.

Installation

pip install -r requirements.txt

Install the required nltk packages

python -m nltk.downloader stopwords averaged_perceptron_tagger

You can also try an online demo on Colab before running locally.

Usage

Run faspect.py and use the API to extract facets, for example you can post json data in this format to 127.0.0.1:6000/extract:

{
    "query": "cars",
    "documents": ["doc 1 text", "doc 2 text", "doc N text"]
}

and get results:

{
    "facets": [
       "cars for rent",
       "animated movie",
       "cars for sale"
    ]
}

or use the classes from the models folder in your project. For evaluation of your own models, please use the metric implementations in evaluation.py.

Citation

If you use any part of this code, including model weights, please cite our paper:

@article{Samarinas_2022_Faspect,
  title   =  {Revisiting Open Domain Query Facet Extraction and Generation},
  author  =  {Chris Samarinas and Arkin Dharawat and Hamed Zamani},
  journal =  {Proceedings of the 2022 ACM SIGIR International Conference on Theory of Information Retrieval},
  year    =  {2022}
}

For any problems or suggestions, feel free to open an issue or contact Chris Samarinas.

faspect's People

Contributors

algoprog avatar arkindharawat avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

prady1272

faspect's Issues

Bert_score issue

There will be something wrong when i calculate bert_score if len(cand_terms) != len(gt_terms)

I got higher results

Why i got higher results using your uploaded checkpoint and code.
Here are my results:
image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.