plots2 icon indicating copy to clipboard operation
plots2 copied to clipboard

Call for related search terms

Open shubhscoder opened this issue 7 years ago • 28 comments

So recently, we implemented a feature wherein the search for a particular term at publiclab.org/search also returns results for the terms that are related to it. #4823 is the relevant issue and #4848 is the solution for the same.

However for the solution to work we have used a dictionary file here - just a simple text file. This dictionary would use a variety of domain specific words and thus we need everyone's help in setting this dictionary properly.

Following types of words are expected to go into the dictionary :

  1. Hyphenated terms when for corresponding non-hyphenated ones. For example, we could have the following pair :
purpleair: purple-air
  1. Related terms, we often use short forms or abbreviations for commonly used terms. But the search engine most of the time misses out on this abbreviations. So we should construct a dictionary of such abbreviations along with the actual corresponding word. For example, this could be one of the pairs:
h2s: Hydrogen Sulphide

Thank you so much!

  • https://github.com/publiclab/plots2/blob/9d36bd7a1c9a285d48b9025da563037507001217/app/services/search_criteria.rb#L46
  • https://github.com/publiclab/plots2/blob/984066aa8825883f28078b22c091897dc62e25c8/lib/text_search.rb
  • https://github.com/publiclab/plots2/blob/984066aa8825883f28078b22c091897dc62e25c8/lib/related_and_hyphenated_terms.dict.txt

shubhscoder avatar Mar 06 '19 17:03 shubhscoder

So @jywarren, do we want people to submit their words by making Pull requests ? Or is there some other way?

shubhscoder avatar Mar 06 '19 17:03 shubhscoder

Nice issue @shubhscoder! How about asking contributors to comment the related terms in issue's comments and we can add them weekly/monthly?

grvsachdeva avatar Mar 06 '19 17:03 grvsachdeva

Yes we could do that @gauravano. Also I have one more idea, how about posting a new wiki on public labs and ask people to comment the related terms there?

shubhscoder avatar Mar 06 '19 17:03 shubhscoder

We can also ask people to edit the wiki?

grvsachdeva avatar Mar 06 '19 17:03 grvsachdeva

Yeah that sounds good. We can do that!

shubhscoder avatar Mar 06 '19 17:03 shubhscoder

I think possibly @ebarry suggested this?

voc: volatile-organic-compund

Others I can think of are:

discussion-list: mailing-list
mailing-list: discussion-list
listserv: mailing-list
dust: pm
pm: dust
particulates: dust
tds: total-dissolved-solids
datalogger: data-logging

jywarren avatar Mar 06 '19 20:03 jywarren

event: meetup meetup: event

formaldehyde: HCHO HCHO: formaldehyde

formaldehyde: CH2O CH2O: formaldehyde

ag: agriculture agriculture: ag

agriculture: farming farming: agriculture

are these pairs not reversable, as in, do i have to write the pairs in the other direction as well?

ebarry avatar Mar 07 '19 13:03 ebarry

I think even the reverse is required.

On Thu, Mar 7, 2019, 7:19 PM Liz Barry [email protected] wrote:

event: meetup formaldehyde: HCHO formaldehyde: CH2O ag: agriculture agriculture: farming

are these pairs not reversable, as in, do i have to write the pairs in the other direction as well?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/publiclab/plots2/issues/4928#issuecomment-470531847, or mute the thread https://github.com/notifications/unsubscribe-auth/ARofxTHZGgPmmKwj42hO2qgodXTy3oaJks5vURjsgaJpZM4bhaVG .

shubhscoder avatar Mar 07 '19 14:03 shubhscoder

alright, well let's use this issue to grab quick thoughts, and then maybe we set up a spreadsheet somewhere with a formula to generate all the reverse forms of the pairs?

cafo: factory-farm factory-farm: cafo

cafo: feedlot feedlot: cafo

confined-animal-feed-operation: cafo cafo: confined-animal-feed-operation

sewage: wastewater wastewater: sewage

salinity: conductivity conductivity: salinity (do we agree with this?)

ebarry avatar Mar 07 '19 14:03 ebarry

Yeah that sounds good👍

On Thu, Mar 7, 2019, 8:21 PM Liz Barry [email protected] wrote:

alright, well let's use this issue to grab quick thoughts, and then maybe we set up a spreadsheet somewhere with a formula to generate all the reverse forms of the pairs?

cafo: factory-farm cafo: feedlot sewage: wastewater salinity: conductivity

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/publiclab/plots2/issues/4928#issuecomment-470555431, or mute the thread https://github.com/notifications/unsubscribe-auth/ARofxfq6j0TRB0sNt3qW2dqAv-YKt2hdks5vUSd8gaJpZM4bhaVG .

shubhscoder avatar Mar 07 '19 15:03 shubhscoder

We may want to do reverse in some cases but not others, so let's keep doing it manually. Some terms might be related to broader terms but we wouldn't want the reverse.

valverde: val-verde

jywarren avatar Mar 12 '19 17:03 jywarren

data-logging: datalogging
data-logging: data logging

jywarren avatar Apr 17 '19 17:04 jywarren

Added all these in a batch: #5503

Noting that we're not sure about how to do multiple word additions; for example:

h2s "Hydrogen Sulphide" <--- liz thinks this is "sulfide"
data-logging "data logging"
cafo "factory farm"

So I'm asking over here: https://github.com/yohasebe/lemmatizer/issues/7

jywarren avatar Apr 17 '19 18:04 jywarren

urban-planning: urban-design urban-design: urban-planning (happy to discuss as once upon a time this was my field, but pragmatically think these should be joined for Public Lab)

soil: dirt dirt: soil

community-engagement: communityengagement communityengagement: community-engagement

marine: water water: marine

ebarry avatar Apr 18 '19 16:04 ebarry

ewb: engineers-without-borders engineers-without-borders: ewb

pole-aerial-photography: pap pap: pole-aerial-photography

global-climate-change: climate-change climate-change: global-climate-change

urbanwater: urbanwaters urbanwaters: urbanwater

ebarry avatar Apr 18 '19 18:04 ebarry

Noting that as of the latest https://github.com/yohasebe/lemmatizer we can now have spaces in the right-hand terms:

https://github.com/yohasebe/lemmatizer#resolving-abbreviations

Thanks to @yohasebe!!!!! ❤️

jywarren avatar Apr 20 '19 02:04 jywarren

colorimetry: colorimetric colorimetric: colorimetry

colorimeter: colorimeters colorimeters: colorimeter

ebarry avatar May 13 '19 16:05 ebarry

hot-spot: hot-spots hot-spots: hot-spot

microscope: microscopes microscopes: microscope

PS Is there a way to automatically relate a word with the same word that just has an "s" on the end? Asking for a friend!

ebarry avatar May 14 '19 17:05 ebarry

plastic: plastics plastics: plastic

radiation: radioactive radioactive: radiation

superfund-site: superfund superfund: superfund-sites

spectra: spectrum spectrum: spectra

spectra-lines: spectra spectra: spectra-lines

spectral: ???????

plume: plumes plumes: plume

ebarry avatar May 14 '19 18:05 ebarry

diagram | diagrams | diagramming <-- how to associate a cluster?

noise: sound sound: noise

ebarry avatar May 15 '19 20:05 ebarry