#StackBounty: #web-apps #collaboration #productivity #machine-learning #autocomplete Trainable Predictive Typing with Phrase suggestion…

Bounty: 50

I would like to find a program that suggests phrases that are commonly used by our business as the user starts typing them, similar to Gmail’s “Smart Compose” feature.

This could be an installed program that suggests phrases in any text input field (sort of like iOS’s keyboard, except for phrases instead of single words, and for MS Windows), or a web app where the person composes the report on a web page, then copies it to the appropriate place.

Background

  • Our business writes reports, all day, every day. We have about 500 people writing these reports.
  • The reports have a specific structure. Each paragraph has a specific thing it is supposed to report about.
  • Paragraphs are usually 1-2 sentences long.
  • The entire report is typically a half page long, but could be as long as three pages.
  • The reports are plain text. The formatting is handled by our inventory management system.

Requirements

  • The program can be trained using the text from our half million existing reports.
  • The program continues to learn from the reports we write and the phrases users are likely to accept.
  • The program’s learning takes place on a company-wide level, not at the user level, so predictive typing improves for everyone. This probably means a web app or server-side software.
  • The program has a interface where management can block phrases they want to stop appearing in reports.
  • The program has a built-in feedback tool that lets users hit a key to flag bad phrases to make them stop showing up. The bad phrases stop showing up for that user, and are reported to management for review.
  • The program can be operated exclusively using the keyboard. No need to touch the mouse.
  • Cost: maybe $2500 for a perpetual, company-wide license? I might be able to get approval for more if it’s something really phenomenal.

What I have looked at

  • Most of our users keep a separate document with commonly-used phrases they can copy and paste into their report, changing just a word or two as needed. The software you recommend would make this practice obsolete.
  • One person started using PhraseExpress a few years ago and loved it, so we recommended it to everyone, but so far I only know of three people (out of 500) who have started using it. It seems the learning curve is too steep (80% of our associates are independent contractors, so we can only suggest they use the software, not require it). It’s really more of a clipboard manager than predictive typing software. It requires the user to manage their own phrases and type abbreviations to insert a phrase, rather than suggesting phrases based on context and previous usage. I expect that something that adds on to what the user is already doing would have a much higher adoption rate.
  • Lightkey sounds good, but it sounds like its “collective wisdom” feature is a new feature that’s not mature yet. It’s not clear if it has a management interface or not. It’s a bit out of budget, but I could probably get approval for it if it strongly meets our requirements.
  • Typing Assistant and FastKeys seem to be for a single user, not an organization. They don’t seem to have a way to share their learning.
  • Other programs I looked at only suggested a single word, instead of suggesting whole phrases.

Related questions

Predictive text for personal use

These questions are about predictive text for a single user, not for company-wide predictive text.

Sharing report formatting company-wide

This question is about sharing formatting for reports, not about sharing phrases used in reports.


Get this bounty!!!

#StackBounty: #zsh #autocomplete zsh _arguments completion that gradually reveals options

Bounty: 50

I have at the moment a completion function that looks something like this (except way more entries)

_arguments 
  '-check[do a check]' 
  '-play[play a specific song]:songnumber' 
  '-test.n=[run test specified number of times]:n' 
  '-test.dir=[run test in a specific working dir]:dir: _path_files -/' 
  '-test.v[run tests verbose]' 
  '-log[delete all log files]' 
  '*:inputfiles: _files'

upon tabbing this leads to printout like that:

pseyfert@robusta:~ > program -⇥
option:
-check     -- do a check
-log       -- delete all log files
-play      -- play a specific song
-test.dir  -- run test in a specific working dir
-test.n    -- run test specified number of times
-test.v    -- run tests verbose

One pattern is that a considerable number of options starts with -test. and I am often not interested in them, so when looking for an option that I don’t know by heart, the entire -test. block is somewhat spam. I’d prefer to group the options to a printout like that:

pseyfert@robusta:~ > program -⇥
option:
-check     -- do a check
-log       -- delete all log files
-play      -- play a specific song
-test.     -- test options

and then when reaching -test. reveal what’s behind:

pseyfert@robusta:~ > program -test.⇥
option:
-test.dir  -- run test in a specific working dir
-test.n    -- run test specified number of times
-test.v    -- run tests verbose

I realized I can get in the right direction with a minus after the option

_arguments 
  '-check[do a check]' 
  '-play[play a specific song]:songnumber' 
  '-log[delete all log files]' 
  '-test.-[test options]:testopts: _testopts' 
  '*:inputfiles: _files'

such that no space gets added after -test. and a space will not be interpreted as “option continues”. What I lack in my repertoire is the _testopts function. I’m tempted to use _arguments again, but that requires leading - after the -test.. With _values I am not aware of a method to place the descriptions and don’t know how to continue into other functions like _path_files -/ above.

Are there any examples for gradual option revealing or hints how to best change the design of my completion?


Get this bounty!!!

#StackBounty: #ubuntu #zsh #git #autocomplete #oh-my-zsh How to use zsh tab completion on Git without origin?

Bounty: 50

I am using zsh with oh-my-zsh on Ubuntu 18.04.2. Currently, Git is installed at version 2.20.1.

Whenever I want to push a local branch to a remote (origin) I try to use the tab completion in the shell as follows:

git push origin fea<TAB>

The tab completion results in:

git push origin origin/feature

I cannot push to origin/feature, though. What I actually want is:

git push origin feature

The same applies to git checkout.

How can I configure the tab completion to correctly (?) complete the remote branch – or am I missing something?


Get this bounty!!!

#StackBounty: #bash #autocomplete #complete Escape slashes in bash complete

Bounty: 250

I try to use the bash complete builtin to show different options for a command.

I have problems when an option contains a path like in -F/dev/null.

Currently I’m using

#!/bin/bash

_xyz-completion ()
{
  local cur

  COMPREPLY=()   # Array variable storing the possible completions.
  cur=${COMP_WORDS[COMP_CWORD]}

  case "$cur" in
    -*)
    COMPREPLY=( $( compgen -W "-oOption1 -F/dev/null" -- $cur ) )
    ;;
  esac

  return 0
}

complete -F _xyz-completion -o filenames xyz

If -F was already typed, then a Tab completes it successfully.

But if only - was typed, then a Tab shows

null       -oOption1

But I expect to see

-F/dev/null       -oOption1

I tried already -F/dev/null, -F//dev//null, "-F/dev/null" and -F\/dev\/null

It seems to be only a display problem, as the completion itself works as expected.

I can’t see how to appropriate escape the slashes in `-F/dev/null`.


To comment the comments:

1)

Never mind, it’s a problem also if -F is replaced by a non-option such as -Q. – Benjamin W.

It’s not a problem, that the -F looks like a option for complete itself, as it even fails if I changed it to xOPTION1 xF/dev/null

2)

I’m wondering what compgen -W “-oOption1 -F/dev/null” — – displays for you.

It displays (as expected)

-oOption1
-F/dev/null

As mentioned, -F completes successfully to -F/dev/null


Get this bounty!!!

#StackBounty: #python #autocomplete #sublimetext3 #pytorch #code-completion PyTorch autocomplete in Sublime Text 3

Bounty: 50

I’m a fan of Sublime Text 3 and would like to get code autocompletion for PyTorch. However, I can’t get this working yet. Any suggestions or starting points where I can begin to get this working?

I have searched in the packages repository of Sublime Text but unfortunately there’s none.

Note: I have looked at a related question here IDE autocomplete for pytorch but that’s only for VS Code.


Get this bounty!!!